Class DocumentQuery.Builder (0.6.0)

public static final class DocumentQuery.Builder extends GeneratedMessageV3.Builder<DocumentQuery.Builder> implements DocumentQueryOrBuilder

Protobuf type google.cloud.contentwarehouse.v1.DocumentQuery

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllDocumentCreatorFilter(Iterable<String> values)

public DocumentQuery.Builder addAllDocumentCreatorFilter(Iterable<String> values)

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.

repeated string document_creator_filter = 11;

Parameter
NameDescription
valuesIterable<String>

The documentCreatorFilter to add.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

addAllDocumentSchemaNames(Iterable<String> values)

public DocumentQuery.Builder addAllDocumentSchemaNames(Iterable<String> values)

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.

repeated string document_schema_names = 6;

Parameter
NameDescription
valuesIterable<String>

The documentSchemaNames to add.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

addAllPropertyFilter(Iterable<? extends PropertyFilter> values)

public DocumentQuery.Builder addAllPropertyFilter(Iterable<? extends PropertyFilter> values)

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.contentwarehouse.v1.PropertyFilter>
Returns
TypeDescription
DocumentQuery.Builder

addAllQueryContext(Iterable<String> values)

public DocumentQuery.Builder addAllQueryContext(Iterable<String> values)

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.

repeated string query_context = 10;

Parameter
NameDescription
valuesIterable<String>

The queryContext to add.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

addAllTimeFilters(Iterable<? extends TimeFilter> values)

public DocumentQuery.Builder addAllTimeFilters(Iterable<? extends TimeFilter> values)

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.contentwarehouse.v1.TimeFilter>
Returns
TypeDescription
DocumentQuery.Builder

addDocumentCreatorFilter(String value)

public DocumentQuery.Builder addDocumentCreatorFilter(String value)

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.

repeated string document_creator_filter = 11;

Parameter
NameDescription
valueString

The documentCreatorFilter to add.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

addDocumentCreatorFilterBytes(ByteString value)

public DocumentQuery.Builder addDocumentCreatorFilterBytes(ByteString value)

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.

repeated string document_creator_filter = 11;

Parameter
NameDescription
valueByteString

The bytes of the documentCreatorFilter to add.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

addDocumentSchemaNames(String value)

public DocumentQuery.Builder addDocumentSchemaNames(String value)

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.

repeated string document_schema_names = 6;

Parameter
NameDescription
valueString

The documentSchemaNames to add.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

addDocumentSchemaNamesBytes(ByteString value)

public DocumentQuery.Builder addDocumentSchemaNamesBytes(ByteString value)

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.

repeated string document_schema_names = 6;

Parameter
NameDescription
valueByteString

The bytes of the documentSchemaNames to add.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

addPropertyFilter(PropertyFilter value)

public DocumentQuery.Builder addPropertyFilter(PropertyFilter value)

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Parameter
NameDescription
valuePropertyFilter
Returns
TypeDescription
DocumentQuery.Builder

addPropertyFilter(PropertyFilter.Builder builderForValue)

public DocumentQuery.Builder addPropertyFilter(PropertyFilter.Builder builderForValue)

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Parameter
NameDescription
builderForValuePropertyFilter.Builder
Returns
TypeDescription
DocumentQuery.Builder

addPropertyFilter(int index, PropertyFilter value)

public DocumentQuery.Builder addPropertyFilter(int index, PropertyFilter value)

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Parameters
NameDescription
indexint
valuePropertyFilter
Returns
TypeDescription
DocumentQuery.Builder

addPropertyFilter(int index, PropertyFilter.Builder builderForValue)

public DocumentQuery.Builder addPropertyFilter(int index, PropertyFilter.Builder builderForValue)

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Parameters
NameDescription
indexint
builderForValuePropertyFilter.Builder
Returns
TypeDescription
DocumentQuery.Builder

addPropertyFilterBuilder()

public PropertyFilter.Builder addPropertyFilterBuilder()

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Returns
TypeDescription
PropertyFilter.Builder

addPropertyFilterBuilder(int index)

public PropertyFilter.Builder addPropertyFilterBuilder(int index)

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
PropertyFilter.Builder

addQueryContext(String value)

public DocumentQuery.Builder addQueryContext(String value)

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.

repeated string query_context = 10;

Parameter
NameDescription
valueString

The queryContext to add.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

addQueryContextBytes(ByteString value)

public DocumentQuery.Builder addQueryContextBytes(ByteString value)

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.

repeated string query_context = 10;

Parameter
NameDescription
valueByteString

The bytes of the queryContext to add.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DocumentQuery.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DocumentQuery.Builder
Overrides

addTimeFilters(TimeFilter value)

public DocumentQuery.Builder addTimeFilters(TimeFilter value)

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Parameter
NameDescription
valueTimeFilter
Returns
TypeDescription
DocumentQuery.Builder

addTimeFilters(TimeFilter.Builder builderForValue)

public DocumentQuery.Builder addTimeFilters(TimeFilter.Builder builderForValue)

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Parameter
NameDescription
builderForValueTimeFilter.Builder
Returns
TypeDescription
DocumentQuery.Builder

addTimeFilters(int index, TimeFilter value)

public DocumentQuery.Builder addTimeFilters(int index, TimeFilter value)

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Parameters
NameDescription
indexint
valueTimeFilter
Returns
TypeDescription
DocumentQuery.Builder

addTimeFilters(int index, TimeFilter.Builder builderForValue)

public DocumentQuery.Builder addTimeFilters(int index, TimeFilter.Builder builderForValue)

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Parameters
NameDescription
indexint
builderForValueTimeFilter.Builder
Returns
TypeDescription
DocumentQuery.Builder

addTimeFiltersBuilder()

public TimeFilter.Builder addTimeFiltersBuilder()

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Returns
TypeDescription
TimeFilter.Builder

addTimeFiltersBuilder(int index)

public TimeFilter.Builder addTimeFiltersBuilder(int index)

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
TimeFilter.Builder

build()

public DocumentQuery build()
Returns
TypeDescription
DocumentQuery

buildPartial()

public DocumentQuery buildPartial()
Returns
TypeDescription
DocumentQuery

clear()

public DocumentQuery.Builder clear()
Returns
TypeDescription
DocumentQuery.Builder
Overrides

clearCustomPropertyFilter() (deprecated)

public DocumentQuery.Builder clearCustomPropertyFilter()

Deprecated. google.cloud.contentwarehouse.v1.DocumentQuery.custom_property_filter is deprecated. See google/cloud/contentwarehouse/v1/filters.proto;l=59

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

string custom_property_filter = 4 [deprecated = true];

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

clearDocumentCreatorFilter()

public DocumentQuery.Builder clearDocumentCreatorFilter()

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.

repeated string document_creator_filter = 11;

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

clearDocumentSchemaNames()

public DocumentQuery.Builder clearDocumentSchemaNames()

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.

repeated string document_schema_names = 6;

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public DocumentQuery.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
DocumentQuery.Builder
Overrides

clearFileTypeFilter()

public DocumentQuery.Builder clearFileTypeFilter()

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.

.google.cloud.contentwarehouse.v1.FileTypeFilter file_type_filter = 8;

Returns
TypeDescription
DocumentQuery.Builder

clearFolderNameFilter()

public DocumentQuery.Builder clearFolderNameFilter()

Search all the documents under this specified folder. Format: projects/{project_number}/locations/{location}/documents/{document_id}.

string folder_name_filter = 9;

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

clearIsNlQuery()

public DocumentQuery.Builder clearIsNlQuery()

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.

bool is_nl_query = 12;

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public DocumentQuery.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
DocumentQuery.Builder
Overrides

clearPropertyFilter()

public DocumentQuery.Builder clearPropertyFilter()

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Returns
TypeDescription
DocumentQuery.Builder

clearQuery()

public DocumentQuery.Builder clearQuery()

The query string that matches against the full text of the document and the searchable properties. The maximum number of allowed characters is 255.

string query = 1;

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

clearQueryContext()

public DocumentQuery.Builder clearQueryContext()

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.

repeated string query_context = 10;

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

clearTimeFilters()

public DocumentQuery.Builder clearTimeFilters()

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Returns
TypeDescription
DocumentQuery.Builder

clone()

public DocumentQuery.Builder clone()
Returns
TypeDescription
DocumentQuery.Builder
Overrides

getCustomPropertyFilter() (deprecated)

public String getCustomPropertyFilter()

Deprecated. google.cloud.contentwarehouse.v1.DocumentQuery.custom_property_filter is deprecated. See google/cloud/contentwarehouse/v1/filters.proto;l=59

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

string custom_property_filter = 4 [deprecated = true];

Returns
TypeDescription
String

The customPropertyFilter.

getCustomPropertyFilterBytes() (deprecated)

public ByteString getCustomPropertyFilterBytes()

Deprecated. google.cloud.contentwarehouse.v1.DocumentQuery.custom_property_filter is deprecated. See google/cloud/contentwarehouse/v1/filters.proto;l=59

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

string custom_property_filter = 4 [deprecated = true];

Returns
TypeDescription
ByteString

The bytes for customPropertyFilter.

getDefaultInstanceForType()

public DocumentQuery getDefaultInstanceForType()
Returns
TypeDescription
DocumentQuery

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDocumentCreatorFilter(int index)

public String getDocumentCreatorFilter(int index)

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.

repeated string document_creator_filter = 11;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The documentCreatorFilter at the given index.

getDocumentCreatorFilterBytes(int index)

public ByteString getDocumentCreatorFilterBytes(int index)

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.

repeated string document_creator_filter = 11;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the documentCreatorFilter at the given index.

getDocumentCreatorFilterCount()

public int getDocumentCreatorFilterCount()

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.

repeated string document_creator_filter = 11;

Returns
TypeDescription
int

The count of documentCreatorFilter.

getDocumentCreatorFilterList()

public ProtocolStringList getDocumentCreatorFilterList()

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.

repeated string document_creator_filter = 11;

Returns
TypeDescription
ProtocolStringList

A list containing the documentCreatorFilter.

getDocumentSchemaNames(int index)

public String getDocumentSchemaNames(int index)

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.

repeated string document_schema_names = 6;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The documentSchemaNames at the given index.

getDocumentSchemaNamesBytes(int index)

public ByteString getDocumentSchemaNamesBytes(int index)

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.

repeated string document_schema_names = 6;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the documentSchemaNames at the given index.

getDocumentSchemaNamesCount()

public int getDocumentSchemaNamesCount()

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.

repeated string document_schema_names = 6;

Returns
TypeDescription
int

The count of documentSchemaNames.

getDocumentSchemaNamesList()

public ProtocolStringList getDocumentSchemaNamesList()

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.

repeated string document_schema_names = 6;

Returns
TypeDescription
ProtocolStringList

A list containing the documentSchemaNames.

getFileTypeFilter()

public FileTypeFilter getFileTypeFilter()

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.

.google.cloud.contentwarehouse.v1.FileTypeFilter file_type_filter = 8;

Returns
TypeDescription
FileTypeFilter

The fileTypeFilter.

getFileTypeFilterBuilder()

public FileTypeFilter.Builder getFileTypeFilterBuilder()

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.

.google.cloud.contentwarehouse.v1.FileTypeFilter file_type_filter = 8;

Returns
TypeDescription
FileTypeFilter.Builder

getFileTypeFilterOrBuilder()

public FileTypeFilterOrBuilder getFileTypeFilterOrBuilder()

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.

.google.cloud.contentwarehouse.v1.FileTypeFilter file_type_filter = 8;

Returns
TypeDescription
FileTypeFilterOrBuilder

getFolderNameFilter()

public String getFolderNameFilter()

Search all the documents under this specified folder. Format: projects/{project_number}/locations/{location}/documents/{document_id}.

string folder_name_filter = 9;

Returns
TypeDescription
String

The folderNameFilter.

getFolderNameFilterBytes()

public ByteString getFolderNameFilterBytes()

Search all the documents under this specified folder. Format: projects/{project_number}/locations/{location}/documents/{document_id}.

string folder_name_filter = 9;

Returns
TypeDescription
ByteString

The bytes for folderNameFilter.

getIsNlQuery()

public boolean getIsNlQuery()

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.

bool is_nl_query = 12;

Returns
TypeDescription
boolean

The isNlQuery.

getPropertyFilter(int index)

public PropertyFilter getPropertyFilter(int index)

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
PropertyFilter

getPropertyFilterBuilder(int index)

public PropertyFilter.Builder getPropertyFilterBuilder(int index)

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
PropertyFilter.Builder

getPropertyFilterBuilderList()

public List<PropertyFilter.Builder> getPropertyFilterBuilderList()

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Returns
TypeDescription
List<Builder>

getPropertyFilterCount()

public int getPropertyFilterCount()

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Returns
TypeDescription
int

getPropertyFilterList()

public List<PropertyFilter> getPropertyFilterList()

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Returns
TypeDescription
List<PropertyFilter>

getPropertyFilterOrBuilder(int index)

public PropertyFilterOrBuilder getPropertyFilterOrBuilder(int index)

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
PropertyFilterOrBuilder

getPropertyFilterOrBuilderList()

public List<? extends PropertyFilterOrBuilder> getPropertyFilterOrBuilderList()

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Returns
TypeDescription
List<? extends com.google.cloud.contentwarehouse.v1.PropertyFilterOrBuilder>

getQuery()

public String getQuery()

The query string that matches against the full text of the document and the searchable properties. The maximum number of allowed characters is 255.

string query = 1;

Returns
TypeDescription
String

The query.

getQueryBytes()

public ByteString getQueryBytes()

The query string that matches against the full text of the document and the searchable properties. The maximum number of allowed characters is 255.

string query = 1;

Returns
TypeDescription
ByteString

The bytes for query.

getQueryContext(int index)

public String getQueryContext(int index)

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.

repeated string query_context = 10;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The queryContext at the given index.

getQueryContextBytes(int index)

public ByteString getQueryContextBytes(int index)

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.

repeated string query_context = 10;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the queryContext at the given index.

getQueryContextCount()

public int getQueryContextCount()

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.

repeated string query_context = 10;

Returns
TypeDescription
int

The count of queryContext.

getQueryContextList()

public ProtocolStringList getQueryContextList()

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.

repeated string query_context = 10;

Returns
TypeDescription
ProtocolStringList

A list containing the queryContext.

getTimeFilters(int index)

public TimeFilter getTimeFilters(int index)

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
TimeFilter

getTimeFiltersBuilder(int index)

public TimeFilter.Builder getTimeFiltersBuilder(int index)

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
TimeFilter.Builder

getTimeFiltersBuilderList()

public List<TimeFilter.Builder> getTimeFiltersBuilderList()

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Returns
TypeDescription
List<Builder>

getTimeFiltersCount()

public int getTimeFiltersCount()

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Returns
TypeDescription
int

getTimeFiltersList()

public List<TimeFilter> getTimeFiltersList()

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Returns
TypeDescription
List<TimeFilter>

getTimeFiltersOrBuilder(int index)

public TimeFilterOrBuilder getTimeFiltersOrBuilder(int index)

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
TimeFilterOrBuilder

getTimeFiltersOrBuilderList()

public List<? extends TimeFilterOrBuilder> getTimeFiltersOrBuilderList()

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Returns
TypeDescription
List<? extends com.google.cloud.contentwarehouse.v1.TimeFilterOrBuilder>

hasFileTypeFilter()

public boolean hasFileTypeFilter()

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.

.google.cloud.contentwarehouse.v1.FileTypeFilter file_type_filter = 8;

Returns
TypeDescription
boolean

Whether the fileTypeFilter field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFileTypeFilter(FileTypeFilter value)

public DocumentQuery.Builder mergeFileTypeFilter(FileTypeFilter value)

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.

.google.cloud.contentwarehouse.v1.FileTypeFilter file_type_filter = 8;

Parameter
NameDescription
valueFileTypeFilter
Returns
TypeDescription
DocumentQuery.Builder

mergeFrom(DocumentQuery other)

public DocumentQuery.Builder mergeFrom(DocumentQuery other)
Parameter
NameDescription
otherDocumentQuery
Returns
TypeDescription
DocumentQuery.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DocumentQuery.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DocumentQuery.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public DocumentQuery.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
DocumentQuery.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DocumentQuery.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DocumentQuery.Builder
Overrides

removePropertyFilter(int index)

public DocumentQuery.Builder removePropertyFilter(int index)

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
DocumentQuery.Builder

removeTimeFilters(int index)

public DocumentQuery.Builder removeTimeFilters(int index)

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
DocumentQuery.Builder

setCustomPropertyFilter(String value) (deprecated)

public DocumentQuery.Builder setCustomPropertyFilter(String value)

Deprecated. google.cloud.contentwarehouse.v1.DocumentQuery.custom_property_filter is deprecated. See google/cloud/contentwarehouse/v1/filters.proto;l=59

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

string custom_property_filter = 4 [deprecated = true];

Parameter
NameDescription
valueString

The customPropertyFilter to set.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

setCustomPropertyFilterBytes(ByteString value) (deprecated)

public DocumentQuery.Builder setCustomPropertyFilterBytes(ByteString value)

Deprecated. google.cloud.contentwarehouse.v1.DocumentQuery.custom_property_filter is deprecated. See google/cloud/contentwarehouse/v1/filters.proto;l=59

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

string custom_property_filter = 4 [deprecated = true];

Parameter
NameDescription
valueByteString

The bytes for customPropertyFilter to set.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

setDocumentCreatorFilter(int index, String value)

public DocumentQuery.Builder setDocumentCreatorFilter(int index, String value)

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.

repeated string document_creator_filter = 11;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The documentCreatorFilter to set.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

setDocumentSchemaNames(int index, String value)

public DocumentQuery.Builder setDocumentSchemaNames(int index, String value)

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.

repeated string document_schema_names = 6;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The documentSchemaNames to set.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public DocumentQuery.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DocumentQuery.Builder
Overrides

setFileTypeFilter(FileTypeFilter value)

public DocumentQuery.Builder setFileTypeFilter(FileTypeFilter value)

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.

.google.cloud.contentwarehouse.v1.FileTypeFilter file_type_filter = 8;

Parameter
NameDescription
valueFileTypeFilter
Returns
TypeDescription
DocumentQuery.Builder

setFileTypeFilter(FileTypeFilter.Builder builderForValue)

public DocumentQuery.Builder setFileTypeFilter(FileTypeFilter.Builder builderForValue)

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.

.google.cloud.contentwarehouse.v1.FileTypeFilter file_type_filter = 8;

Parameter
NameDescription
builderForValueFileTypeFilter.Builder
Returns
TypeDescription
DocumentQuery.Builder

setFolderNameFilter(String value)

public DocumentQuery.Builder setFolderNameFilter(String value)

Search all the documents under this specified folder. Format: projects/{project_number}/locations/{location}/documents/{document_id}.

string folder_name_filter = 9;

Parameter
NameDescription
valueString

The folderNameFilter to set.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

setFolderNameFilterBytes(ByteString value)

public DocumentQuery.Builder setFolderNameFilterBytes(ByteString value)

Search all the documents under this specified folder. Format: projects/{project_number}/locations/{location}/documents/{document_id}.

string folder_name_filter = 9;

Parameter
NameDescription
valueByteString

The bytes for folderNameFilter to set.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

setIsNlQuery(boolean value)

public DocumentQuery.Builder setIsNlQuery(boolean value)

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.

bool is_nl_query = 12;

Parameter
NameDescription
valueboolean

The isNlQuery to set.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

setPropertyFilter(int index, PropertyFilter value)

public DocumentQuery.Builder setPropertyFilter(int index, PropertyFilter value)

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Parameters
NameDescription
indexint
valuePropertyFilter
Returns
TypeDescription
DocumentQuery.Builder

setPropertyFilter(int index, PropertyFilter.Builder builderForValue)

public DocumentQuery.Builder setPropertyFilter(int index, PropertyFilter.Builder builderForValue)

This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as true. The relationship between the PropertyFilters is OR.

repeated .google.cloud.contentwarehouse.v1.PropertyFilter property_filter = 7;

Parameters
NameDescription
indexint
builderForValuePropertyFilter.Builder
Returns
TypeDescription
DocumentQuery.Builder

setQuery(String value)

public DocumentQuery.Builder setQuery(String value)

The query string that matches against the full text of the document and the searchable properties. The maximum number of allowed characters is 255.

string query = 1;

Parameter
NameDescription
valueString

The query to set.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

setQueryBytes(ByteString value)

public DocumentQuery.Builder setQueryBytes(ByteString value)

The query string that matches against the full text of the document and the searchable properties. The maximum number of allowed characters is 255.

string query = 1;

Parameter
NameDescription
valueByteString

The bytes for query to set.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

setQueryContext(int index, String value)

public DocumentQuery.Builder setQueryContext(int index, String value)

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.

repeated string query_context = 10;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The queryContext to set.

Returns
TypeDescription
DocumentQuery.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public DocumentQuery.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
DocumentQuery.Builder
Overrides

setTimeFilters(int index, TimeFilter value)

public DocumentQuery.Builder setTimeFilters(int index, TimeFilter value)

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Parameters
NameDescription
indexint
valueTimeFilter
Returns
TypeDescription
DocumentQuery.Builder

setTimeFilters(int index, TimeFilter.Builder builderForValue)

public DocumentQuery.Builder setTimeFilters(int index, TimeFilter.Builder builderForValue)

Documents created/updated within a range specified by this filter are searched against.

repeated .google.cloud.contentwarehouse.v1.TimeFilter time_filters = 5;

Parameters
NameDescription
indexint
builderForValueTimeFilter.Builder
Returns
TypeDescription
DocumentQuery.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final DocumentQuery.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DocumentQuery.Builder
Overrides