NAME
Google::Cloud::Contentwarehouse::V1::Filters - Compiled Protocol Buffers messages for google/cloud/contentwarehouse/v1/filters.proto
SYNOPSIS
use Google::Cloud::Contentwarehouse::V1::Filters;
my $msg = Google::Cloud::Contentwarehouse::V1::Filters::DocumentQuery->new({
query => $query,
is_nl_query => $is_nl_query,
custom_property_filter => $custom_property_filter,
time_filters => $time_filters,
});
# Read or update a field
my $val = $msg->query();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Contentwarehouse::V1::Filters::DocumentQuery->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/contentwarehouse/v1/filters.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Contentwarehouse::V1::Filters::DocumentQuery
Inherits from Protobuf::Message.
Accessors
$msg->query()/$msg->query($value)Type:
StringThe query string that matches against the full text of the document and the searchable properties.
The query partially supports [Google AIP style syntax](https://google.aip.dev/160). Specifically, the query supports literals, logical operators, negation operators, comparison operators, and functions.
Literals: A bare literal value (examples: "42", "Hugo") is a value to be matched against. It searches over the full text of the document and the searchable properties.
Logical operators: "AND", "and", "OR", and "or" are binary logical operators (example: "engineer OR developer").
Negation operators: "NOT" and "!" are negation operators (example: "NOT software").
Comparison operators: support the binary comparison operators =, !=, <, >, <= and >= for string, numeric, enum, boolean. Also support like operator `~~` for string. It provides semantic search functionality by parsing, stemming and doing synonyms expansion against the input query.
To specify a property in the query, the left hand side expression in the comparison must be the property ID including the parent. The right hand side must be literals. For example: "\"projects/123/locations/us\".property_a < 1" matches results whose "property_a" is less than 1 in project 123 and us location. The literals and comparison expression can be connected in a single query (example: "software engineer \"projects/123/locations/us\".salary > 100").
Functions: supported functions are `LOWER([property_name])` to perform a case insensitive match and `EMPTY([property_name])` to filter on the existence of a key.
Support nested expressions connected using parenthesis and logical operators. The default logical operators is `AND` if there is no operators between expressions.
The query can be used with other filters e.g. `time_filters` and `folder_name_filter`. They are connected with `AND` operator under the hood.
The maximum number of allowed characters is 255.
$msg->is_nl_query()/$msg->is_nl_query($value)Type:
BoolExperimental, do not use. If the query is a natural language question. False by default. If true, then the question-answering feature will be used instead of search, and `result_count` in [SearchDocumentsRequest][google.cloud.contentwarehouse.v1.SearchDocumentsRequest] must be set. In addition, all other input fields related to search (pagination, histograms, etc.) will be ignored.
$msg->custom_property_filter()/$msg->custom_property_filter($value)Type:
StringThis filter specifies a structured syntax to match against the [PropertyDefinition].[is_filterable][] marked as `true`. The syntax for this expression is a subset of SQL syntax.
Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the left of the operator is a property name and the right of the operator is a number or a quoted string. You must escape backslash (\\) and quote (\") characters. Supported functions are `LOWER([property_name])` to perform a case insensitive match and `EMPTY([property_name])` to filter on the existence of a key.
Boolean expressions (AND/OR/NOT) are supported up to 3 levels of nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 comparisons or functions are allowed in the expression. The expression must be < 6000 bytes in length.
Sample Query: `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND driving_years > 10`
$msg->time_filters()/$msg->time_filters($value)Type:
Message(Google::Cloud::Contentwarehouse::V1::Filters::TimeFilter)Documents created/updated within a range specified by this filter are searched against.
$msg->document_schema_names()/$msg->document_schema_names($value)Type:
StringThis filter specifies the exact document schema [Document.document_schema_name][google.cloud.contentwarehouse.v1.Document.document_schema_name] of the documents to search against.
If a value isn't specified, documents within the search results are associated with any schema. If multiple values are specified, documents within the search results may be associated with any of the specified schemas.
At most 20 document schema names are allowed.
$msg->property_filter()/$msg->property_filter($value)Type:
Message(Google::Cloud::Contentwarehouse::V1::Filters::PropertyFilter)This filter specifies a structured syntax to match against the [PropertyDefinition.is_filterable][google.cloud.contentwarehouse.v1.PropertyDefinition.is_filterable] marked as `true`. The relationship between the PropertyFilters is OR.
$msg->file_type_filter()/$msg->file_type_filter($value)Type:
Message(Google::Cloud::Contentwarehouse::V1::Filters::FileTypeFilter)This filter specifies the types of files to return: ALL, FOLDER, or FILE. If FOLDER or FILE is specified, then only either folders or files will be returned, respectively. If ALL is specified, both folders and files will be returned.
If no value is specified, ALL files will be returned.
$msg->folder_name_filter()/$msg->folder_name_filter($value)Type:
StringSearch all the documents under this specified folder. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
$msg->document_name_filter()/$msg->document_name_filter($value)Type:
StringSearch the documents in the list. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
$msg->query_context()/$msg->query_context($value)Type:
StringFor custom synonyms. Customers provide the synonyms based on context. One customer can provide multiple set of synonyms based on different context. The search query will be expanded based on the custom synonyms of the query context set. By default, no custom synonyms wll be applied if no query context is provided. It is not supported for CMEK compliant deployment.
$msg->document_creator_filter()/$msg->document_creator_filter($value)Type:
StringThe exact creator(s) of the documents to search against.
If a value isn't specified, documents within the search results are associated with any creator. If multiple values are specified, documents within the search results may be associated with any of the specified creators.
$msg->custom_weights_metadata()/$msg->custom_weights_metadata($value)Type:
Message(Google::Cloud::Contentwarehouse::V1::Filters::CustomWeightsMetadata)To support the custom weighting across document schemas, customers need to provide the properties to be used to boost the ranking in the search request. For a search query with CustomWeightsMetadata specified, only the RetrievalImportance for the properties in the CustomWeightsMetadata will be honored.
Google::Cloud::Contentwarehouse::V1::Filters::TimeFilter
Filter on create timestamp or update timestamp of documents.
Inherits from Protobuf::Message.
Accessors
$msg->time_range()/$msg->time_range($value)Type:
Message(Google::Type::Interval::Interval)$msg->time_field()/$msg->time_field($value)Type:
Enum(Google::Cloud::Contentwarehouse::V1::TimeFilter::TimeField)Specifies which time field to filter documents on.
Defaults to [TimeField.UPLOAD_TIME][].
Enum: TimeFilter::TimeField
TIME_FIELD_UNSPECIFIED=>0CREATE_TIME=>1UPDATE_TIME=>2DISPOSITION_TIME=>3
Google::Cloud::Contentwarehouse::V1::Filters::PropertyFilter
Inherits from Protobuf::Message.
Accessors
$msg->document_schema_name()/$msg->document_schema_name($value)Type:
StringThe Document schema name [Document.document_schema_name][google.cloud.contentwarehouse.v1.Document.document_schema_name]. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
$msg->condition()/$msg->condition($value)Type:
StringThe filter condition. The syntax for this expression is a subset of SQL syntax.
Supported operators are: `=`, `!=`, `<`, `<=`, `>`, `>=`, and `~~` where the left of the operator is a property name and the right of the operator is a number or a quoted string. You must escape backslash (\\) and quote (\") characters.
`~~` is the LIKE operator. The right of the operator must be a string. The only supported property data type for LIKE is text_values. It provides semantic search functionality by parsing, stemming and doing synonyms expansion against the input query. It matches if the property contains semantic similar content to the query. It is not regex matching or wildcard matching. For example, "property.company ~~ \"google\"" will match records whose property `property.compnay` have values like "Google Inc.", "Google LLC" or "Google Company".
Supported functions are `LOWER([property_name])` to perform a case insensitive match and `EMPTY([property_name])` to filter on the existence of a key.
Boolean expressions (AND/OR/NOT) are supported up to 3 levels of nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 comparisons or functions are allowed in the expression. The expression must be < 6000 bytes in length.
Only properties that are marked filterable are allowed ([PropertyDefinition.is_filterable][google.cloud.contentwarehouse.v1.PropertyDefinition.is_filterable]). Property names do not need to be prefixed by the document schema id (as is the case with histograms), however property names will need to be prefixed by its parent hierarchy, if any. For example: top_property_name.sub_property_name.
Sample Query: `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND driving_years > 10`
CMEK compliant deployment only supports:
* Operators: `=`, `<`, `<=`, `>`, and `>=`. * Boolean expressions: AND and OR.
Google::Cloud::Contentwarehouse::V1::Filters::FileTypeFilter
Filter for the specific types of documents returned.
Inherits from Protobuf::Message.
Accessors
$msg->file_type()/$msg->file_type($value)Type:
Enum(Google::Cloud::Contentwarehouse::V1::FileTypeFilter::FileType)The type of files to return.
Enum: FileTypeFilter::FileType
FILE_TYPE_UNSPECIFIED=>0ALL=>1FOLDER=>2DOCUMENT=>3ROOT_FOLDER=>4
Google::Cloud::Contentwarehouse::V1::Filters::CustomWeightsMetadata
To support the custom weighting across document schemas.
Inherits from Protobuf::Message.
Accessors
$msg->weighted_schema_properties()/$msg->weighted_schema_properties($value)Type:
Message(Google::Cloud::Contentwarehouse::V1::Filters::WeightedSchemaProperty)List of schema and property name. Allows a maximum of 10 schemas to be specified for relevance boosting.
Google::Cloud::Contentwarehouse::V1::Filters::WeightedSchemaProperty
Specifies the schema property name.
Inherits from Protobuf::Message.
Accessors
$msg->document_schema_name()/$msg->document_schema_name($value)Type:
StringThe document schema name.
$msg->property_names()/$msg->property_names($value)Type:
StringThe property definition names in the schema.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Contentwarehouse::V1::Filters::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.