Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1beta/classes.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb

Overview

Search parameters.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams

Returns a new instance of GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams.



20143
20144
20145
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20143

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#boost_specGoogle::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec

Boost specification to boost certain documents. Corresponds to the JSON property boostSpec



20090
20091
20092
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20090

def boost_spec
  @boost_spec
end

#data_store_specsArray<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec>

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. Corresponds to the JSON property dataStoreSpecs



20098
20099
20100
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20098

def data_store_specs
  @data_store_specs
end

#filterString

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 Corresponds to the JSON property filter

Returns:

  • (String)


20114
20115
20116
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20114

def filter
  @filter
end

#max_return_resultsFixnum

Number of search results to return. The default value is 10. Corresponds to the JSON property maxReturnResults

Returns:

  • (Fixnum)


20119
20120
20121
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20119

def max_return_results
  @max_return_results
end

#natural_language_query_understanding_specGoogle::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec

Specification to enable natural language understanding capabilities for search requests. Corresponds to the JSON property naturalLanguageQueryUnderstandingSpec



20125
20126
20127
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20125

def natural_language_query_understanding_spec
  @natural_language_query_understanding_spec
end

#order_byString

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. Corresponds to the JSON property orderBy

Returns:

  • (String)


20134
20135
20136
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20134

def order_by
  @order_by
end

#search_result_modeString

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

Returns:

  • (String)


20141
20142
20143
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20141

def search_result_mode
  @search_result_mode
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



20148
20149
20150
20151
20152
20153
20154
20155
20156
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 20148

def update!(**args)
  @boost_spec = args[:boost_spec] if args.key?(:boost_spec)
  @data_store_specs = args[:data_store_specs] if args.key?(:data_store_specs)
  @filter = args[:filter] if args.key?(:filter)
  @max_return_results = args[:max_return_results] if args.key?(:max_return_results)
  @natural_language_query_understanding_spec = args[:natural_language_query_understanding_spec] if args.key?(:natural_language_query_understanding_spec)
  @order_by = args[:order_by] if args.key?(:order_by)
  @search_result_mode = args[:search_result_mode] if args.key?(:search_result_mode)
end