Class AnswerQueryRequest.SearchSpec.SearchParams

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams
All Implemented Interfaces:
AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
AnswerQueryRequest.SearchSpec

public static final class AnswerQueryRequest.SearchSpec.SearchParams extends com.google.protobuf.GeneratedMessage implements AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
 Search parameters.
 
Protobuf type google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams
See Also:
  • Field Details

    • MAX_RETURN_RESULTS_FIELD_NUMBER

      public static final int MAX_RETURN_RESULTS_FIELD_NUMBER
      See Also:
    • FILTER_FIELD_NUMBER

      public static final int FILTER_FIELD_NUMBER
      See Also:
    • BOOST_SPEC_FIELD_NUMBER

      public static final int BOOST_SPEC_FIELD_NUMBER
      See Also:
    • ORDER_BY_FIELD_NUMBER

      public static final int ORDER_BY_FIELD_NUMBER
      See Also:
    • SEARCH_RESULT_MODE_FIELD_NUMBER

      public static final int SEARCH_RESULT_MODE_FIELD_NUMBER
      See Also:
    • DATA_STORE_SPECS_FIELD_NUMBER

      public static final int DATA_STORE_SPECS_FIELD_NUMBER
      See Also:
    • NATURAL_LANGUAGE_QUERY_UNDERSTANDING_SPEC_FIELD_NUMBER

      public static final int NATURAL_LANGUAGE_QUERY_UNDERSTANDING_SPEC_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getMaxReturnResults

      public int getMaxReturnResults()
       Number of search results to return.
       The default value is 10.
       
      int32 max_return_results = 1;
      Specified by:
      getMaxReturnResults in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
      Returns:
      The maxReturnResults.
    • 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](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
       
      string filter = 2;
      Specified by:
      getFilter in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
      Returns:
      The filter.
    • getFilterBytes

      public com.google.protobuf.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](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
       
      string filter = 2;
      Specified by:
      getFilterBytes in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
      Returns:
      The bytes for filter.
    • 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](https://cloud.google.com/retail/docs/boosting#boost)
       
      .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3;
      Specified by:
      hasBoostSpec in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
      Returns:
      Whether the boostSpec field is set.
    • 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](https://cloud.google.com/retail/docs/boosting#boost)
       
      .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3;
      Specified by:
      getBoostSpec in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
      Returns:
      The boostSpec.
    • 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](https://cloud.google.com/retail/docs/boosting#boost)
       
      .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3;
      Specified by:
      getBoostSpecOrBuilder in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
    • getOrderBy

      public String getOrderBy()
       The order in which documents are returned. Documents can be ordered
       by a field in an
       [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
       it unset if ordered by relevance. `order_by` expression is
       case-sensitive. For more information on ordering, see
       [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
      
       If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
       
      string order_by = 4;
      Specified by:
      getOrderBy in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
      Returns:
      The orderBy.
    • getOrderByBytes

      public com.google.protobuf.ByteString getOrderByBytes()
       The order in which documents are returned. Documents can be ordered
       by a field in an
       [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
       it unset if ordered by relevance. `order_by` expression is
       case-sensitive. For more information on ordering, see
       [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
      
       If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
       
      string order_by = 4;
      Specified by:
      getOrderByBytes in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
      Returns:
      The bytes for orderBy.
    • getSearchResultModeValue

      public int getSearchResultModeValue()
       Specifies the search result mode. If unspecified, the
       search result mode defaults to `DOCUMENTS`.
       See [parse and chunk
       documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
       
      .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5;
      Specified by:
      getSearchResultModeValue in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
      Returns:
      The enum numeric value on the wire for searchResultMode.
    • getSearchResultMode

       Specifies the search result mode. If unspecified, the
       search result mode defaults to `DOCUMENTS`.
       See [parse and chunk
       documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
       
      .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5;
      Specified by:
      getSearchResultMode in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
      Returns:
      The searchResultMode.
    • 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.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7;
      Specified by:
      getDataStoreSpecsList in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
    • 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.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7;
      Specified by:
      getDataStoreSpecsOrBuilderList in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
    • 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.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7;
      Specified by:
      getDataStoreSpecsCount in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
    • getDataStoreSpecs

      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.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7;
      Specified by:
      getDataStoreSpecs in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
    • getDataStoreSpecsOrBuilder

      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.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7;
      Specified by:
      getDataStoreSpecsOrBuilder in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
    • hasNaturalLanguageQueryUnderstandingSpec

      public boolean hasNaturalLanguageQueryUnderstandingSpec()
       Optional. Specification to enable natural language understanding
       capabilities for search requests.
       
      .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasNaturalLanguageQueryUnderstandingSpec in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
      Returns:
      Whether the naturalLanguageQueryUnderstandingSpec field is set.
    • getNaturalLanguageQueryUnderstandingSpec

      public SearchRequest.NaturalLanguageQueryUnderstandingSpec getNaturalLanguageQueryUnderstandingSpec()
       Optional. Specification to enable natural language understanding
       capabilities for search requests.
       
      .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNaturalLanguageQueryUnderstandingSpec in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
      Returns:
      The naturalLanguageQueryUnderstandingSpec.
    • getNaturalLanguageQueryUnderstandingSpecOrBuilder

      public SearchRequest.NaturalLanguageQueryUnderstandingSpecOrBuilder getNaturalLanguageQueryUnderstandingSpecOrBuilder()
       Optional. Specification to enable natural language understanding
       capabilities for search requests.
       
      .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNaturalLanguageQueryUnderstandingSpecOrBuilder in interface AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static AnswerQueryRequest.SearchSpec.SearchParams parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AnswerQueryRequest.SearchSpec.SearchParams parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AnswerQueryRequest.SearchSpec.SearchParams parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AnswerQueryRequest.SearchSpec.SearchParams parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AnswerQueryRequest.SearchSpec.SearchParams parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AnswerQueryRequest.SearchSpec.SearchParams parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AnswerQueryRequest.SearchSpec.SearchParams parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AnswerQueryRequest.SearchSpec.SearchParams parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AnswerQueryRequest.SearchSpec.SearchParams parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AnswerQueryRequest.SearchSpec.SearchParams parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AnswerQueryRequest.SearchSpec.SearchParams parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AnswerQueryRequest.SearchSpec.SearchParams parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected AnswerQueryRequest.SearchSpec.SearchParams.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static AnswerQueryRequest.SearchSpec.SearchParams getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<AnswerQueryRequest.SearchSpec.SearchParams> parser()
    • getParserForType

      public com.google.protobuf.Parser<AnswerQueryRequest.SearchSpec.SearchParams> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public AnswerQueryRequest.SearchSpec.SearchParams getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder