Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams

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

Overview

Search parameters.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams

Returns a new instance of GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams.



2174
2175
2176
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2174

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

Instance Attribute Details

#boost_specGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec

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



2128
2129
2130
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2128

def boost_spec
  @boost_spec
end

#custom_fine_tuning_specGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec

Defines custom fine tuning spec. Corresponds to the JSON property customFineTuningSpec



2133
2134
2135
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2133

def custom_fine_tuning_spec
  @custom_fine_tuning_spec
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)


2149
2150
2151
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2149

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)


2154
2155
2156
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2154

def max_return_results
  @max_return_results
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)


2163
2164
2165
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2163

def order_by
  @order_by
end

#search_result_modeString

Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore. DocumentProcessingConfig.chunking_config is specified, it defaults to CHUNKS.

Returns:

  • (String)


2172
2173
2174
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2172

def search_result_mode
  @search_result_mode
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2179
2180
2181
2182
2183
2184
2185
2186
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2179

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