Class DocumentQuery (0.1.0)

DocumentQuery(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Attributes

NameDescription
query str
The query string that matches against the full text of the document and the searchable properties. The maximum number of allowed characters is 255.
is_nl_query bool
Experimental, 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 must be set. In addition, all other input fields related to search (pagination, histograms, etc.) will be ignored.
custom_property_filter str
This 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
time_filters Sequence[google.cloud.contentwarehouse_v1.types.TimeFilter]
Documents created/updated within a range specified by this filter are searched against.
document_schema_names Sequence[str]
This filter specifies the exact document schema 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.
property_filter Sequence[google.cloud.contentwarehouse_v1.types.PropertyFilter]
This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.
file_type_filter google.cloud.contentwarehouse_v1.types.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.
folder_name_filter str
Search all the documents under this specified folder. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
query_context Sequence[str]
For 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.
document_creator_filter Sequence[str]
The 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.

Inheritance

builtins.object > proto.message.Message > DocumentQuery