Class AnswerQueryRequest.SearchSpec.SearchParams.Builder (0.48.0)

public static final class AnswerQueryRequest.SearchSpec.SearchParams.Builder extends GeneratedMessageV3.Builder<AnswerQueryRequest.SearchSpec.SearchParams.Builder> implements AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder

Search parameters.

Protobuf type google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchParams

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllDataStoreSpecs(Iterable<? extends SearchRequest.DataStoreSpec> values)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder addAllDataStoreSpecs(Iterable<? extends SearchRequest.DataStoreSpec> values)

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Parameter
Name Description
values Iterable<? extends com.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec>
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

addDataStoreSpecs(SearchRequest.DataStoreSpec value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder addDataStoreSpecs(SearchRequest.DataStoreSpec value)

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Parameter
Name Description
value SearchRequest.DataStoreSpec
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

addDataStoreSpecs(SearchRequest.DataStoreSpec.Builder builderForValue)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder addDataStoreSpecs(SearchRequest.DataStoreSpec.Builder builderForValue)

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Parameter
Name Description
builderForValue SearchRequest.DataStoreSpec.Builder
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

addDataStoreSpecs(int index, SearchRequest.DataStoreSpec value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder addDataStoreSpecs(int index, SearchRequest.DataStoreSpec value)

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Parameters
Name Description
index int
value SearchRequest.DataStoreSpec
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

addDataStoreSpecs(int index, SearchRequest.DataStoreSpec.Builder builderForValue)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder addDataStoreSpecs(int index, SearchRequest.DataStoreSpec.Builder builderForValue)

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Parameters
Name Description
index int
builderForValue SearchRequest.DataStoreSpec.Builder
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

addDataStoreSpecsBuilder()

public SearchRequest.DataStoreSpec.Builder addDataStoreSpecsBuilder()

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Returns
Type Description
SearchRequest.DataStoreSpec.Builder

addDataStoreSpecsBuilder(int index)

public SearchRequest.DataStoreSpec.Builder addDataStoreSpecsBuilder(int index)

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.DataStoreSpec.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder
Overrides

build()

public AnswerQueryRequest.SearchSpec.SearchParams build()
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams

buildPartial()

public AnswerQueryRequest.SearchSpec.SearchParams buildPartial()
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams

clear()

public AnswerQueryRequest.SearchSpec.SearchParams.Builder clear()
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder
Overrides

clearBoostSpec()

public AnswerQueryRequest.SearchSpec.SearchParams.Builder clearBoostSpec()

Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see Boosting

.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec boost_spec = 3;

Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

clearDataStoreSpecs()

public AnswerQueryRequest.SearchSpec.SearchParams.Builder clearDataStoreSpecs()

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

clearField(Descriptors.FieldDescriptor field)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder
Overrides

clearFilter()

public AnswerQueryRequest.SearchSpec.SearchParams.Builder clearFilter()

The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response.

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")'

For more information about filtering including syntax and filter operators, see Filter

string filter = 2;

Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

This builder for chaining.

clearMaxReturnResults()

public AnswerQueryRequest.SearchSpec.SearchParams.Builder clearMaxReturnResults()

Number of search results to return. The default value is 10.

int32 max_return_results = 1;

Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder
Overrides

clearOrderBy()

public AnswerQueryRequest.SearchSpec.SearchParams.Builder clearOrderBy()

The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. order_by expression is case-sensitive. For more information on ordering, see Ordering

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

string order_by = 4;

Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

This builder for chaining.

clearSearchResultMode()

public AnswerQueryRequest.SearchSpec.SearchParams.Builder clearSearchResultMode()

Specifies the search result mode. If unspecified, the search result mode defaults to DOCUMENTS. See parse and chunk documents

.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5;

Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

This builder for chaining.

clone()

public AnswerQueryRequest.SearchSpec.SearchParams.Builder clone()
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder
Overrides

getBoostSpec()

public SearchRequest.BoostSpec getBoostSpec()

Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see Boosting

.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec boost_spec = 3;

Returns
Type Description
SearchRequest.BoostSpec

The boostSpec.

getBoostSpecBuilder()

public SearchRequest.BoostSpec.Builder getBoostSpecBuilder()

Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see Boosting

.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec boost_spec = 3;

Returns
Type Description
SearchRequest.BoostSpec.Builder

getBoostSpecOrBuilder()

public SearchRequest.BoostSpecOrBuilder getBoostSpecOrBuilder()

Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see Boosting

.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec boost_spec = 3;

Returns
Type Description
SearchRequest.BoostSpecOrBuilder

getDataStoreSpecs(int index)

public SearchRequest.DataStoreSpec getDataStoreSpecs(int index)

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.DataStoreSpec

getDataStoreSpecsBuilder(int index)

public SearchRequest.DataStoreSpec.Builder getDataStoreSpecsBuilder(int index)

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.DataStoreSpec.Builder

getDataStoreSpecsBuilderList()

public List<SearchRequest.DataStoreSpec.Builder> getDataStoreSpecsBuilderList()

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Returns
Type Description
List<Builder>

getDataStoreSpecsCount()

public int getDataStoreSpecsCount()

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Returns
Type Description
int

getDataStoreSpecsList()

public List<SearchRequest.DataStoreSpec> getDataStoreSpecsList()

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Returns
Type Description
List<DataStoreSpec>

getDataStoreSpecsOrBuilder(int index)

public SearchRequest.DataStoreSpecOrBuilder getDataStoreSpecsOrBuilder(int index)

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.DataStoreSpecOrBuilder

getDataStoreSpecsOrBuilderList()

public List<? extends SearchRequest.DataStoreSpecOrBuilder> getDataStoreSpecsOrBuilderList()

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpecOrBuilder>

getDefaultInstanceForType()

public AnswerQueryRequest.SearchSpec.SearchParams getDefaultInstanceForType()
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFilter()

public String getFilter()

The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response.

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")'

For more information about filtering including syntax and filter operators, see Filter

string filter = 2;

Returns
Type Description
String

The filter.

getFilterBytes()

public ByteString getFilterBytes()

The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response.

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")'

For more information about filtering including syntax and filter operators, see Filter

string filter = 2;

Returns
Type Description
ByteString

The bytes for filter.

getMaxReturnResults()

public int getMaxReturnResults()

Number of search results to return. The default value is 10.

int32 max_return_results = 1;

Returns
Type Description
int

The maxReturnResults.

getOrderBy()

public String getOrderBy()

The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. order_by expression is case-sensitive. For more information on ordering, see Ordering

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

string order_by = 4;

Returns
Type Description
String

The orderBy.

getOrderByBytes()

public ByteString getOrderByBytes()

The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. order_by expression is case-sensitive. For more information on ordering, see Ordering

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

string order_by = 4;

Returns
Type Description
ByteString

The bytes for orderBy.

getSearchResultMode()

public SearchRequest.ContentSearchSpec.SearchResultMode getSearchResultMode()

Specifies the search result mode. If unspecified, the search result mode defaults to DOCUMENTS. See parse and chunk documents

.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5;

Returns
Type Description
SearchRequest.ContentSearchSpec.SearchResultMode

The searchResultMode.

getSearchResultModeValue()

public int getSearchResultModeValue()

Specifies the search result mode. If unspecified, the search result mode defaults to DOCUMENTS. See parse and chunk documents

.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5;

Returns
Type Description
int

The enum numeric value on the wire for searchResultMode.

hasBoostSpec()

public boolean hasBoostSpec()

Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see Boosting

.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec boost_spec = 3;

Returns
Type Description
boolean

Whether the boostSpec field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeBoostSpec(SearchRequest.BoostSpec value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder mergeBoostSpec(SearchRequest.BoostSpec value)

Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see Boosting

.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec boost_spec = 3;

Parameter
Name Description
value SearchRequest.BoostSpec
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

mergeFrom(AnswerQueryRequest.SearchSpec.SearchParams other)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder mergeFrom(AnswerQueryRequest.SearchSpec.SearchParams other)
Parameter
Name Description
other AnswerQueryRequest.SearchSpec.SearchParams
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AnswerQueryRequest.SearchSpec.SearchParams.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder
Overrides

removeDataStoreSpecs(int index)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder removeDataStoreSpecs(int index)

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Parameter
Name Description
index int
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

setBoostSpec(SearchRequest.BoostSpec value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder setBoostSpec(SearchRequest.BoostSpec value)

Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see Boosting

.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec boost_spec = 3;

Parameter
Name Description
value SearchRequest.BoostSpec
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

setBoostSpec(SearchRequest.BoostSpec.Builder builderForValue)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder setBoostSpec(SearchRequest.BoostSpec.Builder builderForValue)

Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see Boosting

.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec boost_spec = 3;

Parameter
Name Description
builderForValue SearchRequest.BoostSpec.Builder
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

setDataStoreSpecs(int index, SearchRequest.DataStoreSpec value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder setDataStoreSpecs(int index, SearchRequest.DataStoreSpec value)

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Parameters
Name Description
index int
value SearchRequest.DataStoreSpec
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

setDataStoreSpecs(int index, SearchRequest.DataStoreSpec.Builder builderForValue)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder setDataStoreSpecs(int index, SearchRequest.DataStoreSpec.Builder builderForValue)

Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.

repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 7;

Parameters
Name Description
index int
builderForValue SearchRequest.DataStoreSpec.Builder
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder
Overrides

setFilter(String value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder setFilter(String value)

The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response.

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")'

For more information about filtering including syntax and filter operators, see Filter

string filter = 2;

Parameter
Name Description
value String

The filter to set.

Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

This builder for chaining.

setFilterBytes(ByteString value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder setFilterBytes(ByteString value)

The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response.

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")'

For more information about filtering including syntax and filter operators, see Filter

string filter = 2;

Parameter
Name Description
value ByteString

The bytes for filter to set.

Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

This builder for chaining.

setMaxReturnResults(int value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder setMaxReturnResults(int value)

Number of search results to return. The default value is 10.

int32 max_return_results = 1;

Parameter
Name Description
value int

The maxReturnResults to set.

Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

This builder for chaining.

setOrderBy(String value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder setOrderBy(String value)

The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. order_by expression is case-sensitive. For more information on ordering, see Ordering

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

string order_by = 4;

Parameter
Name Description
value String

The orderBy to set.

Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

This builder for chaining.

setOrderByBytes(ByteString value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder setOrderByBytes(ByteString value)

The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. order_by expression is case-sensitive. For more information on ordering, see Ordering

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

string order_by = 4;

Parameter
Name Description
value ByteString

The bytes for orderBy to set.

Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

This builder for chaining.

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

public AnswerQueryRequest.SearchSpec.SearchParams.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder
Overrides

setSearchResultMode(SearchRequest.ContentSearchSpec.SearchResultMode value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder setSearchResultMode(SearchRequest.ContentSearchSpec.SearchResultMode value)

Specifies the search result mode. If unspecified, the search result mode defaults to DOCUMENTS. See parse and chunk documents

.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5;

Parameter
Name Description
value SearchRequest.ContentSearchSpec.SearchResultMode

The searchResultMode to set.

Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

This builder for chaining.

setSearchResultModeValue(int value)

public AnswerQueryRequest.SearchSpec.SearchParams.Builder setSearchResultModeValue(int value)

Specifies the search result mode. If unspecified, the search result mode defaults to DOCUMENTS. See parse and chunk documents

.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5;

Parameter
Name Description
value int

The enum numeric value on the wire for searchResultMode to set.

Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final AnswerQueryRequest.SearchSpec.SearchParams.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AnswerQueryRequest.SearchSpec.SearchParams.Builder
Overrides