Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAdvancedCompleteQueryRequestBoostSpecConditionBoostSpec

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

Boost applies to suggestions which match a condition.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaAdvancedCompleteQueryRequestBoostSpecConditionBoostSpec

Returns a new instance of GoogleCloudDiscoveryengineV1betaAdvancedCompleteQueryRequestBoostSpecConditionBoostSpec.



17950
17951
17952
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 17950

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

Instance Attribute Details

#boostFloat

Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the suggestions a big promotion. However, it does not necessarily mean that the top result will be a boosted suggestion. Setting to -1.0 gives the suggestions a big demotion. However, other suggestions that are relevant might still be shown. Setting to 0.0 means no boost applied. The boosting condition is ignored. Corresponds to the JSON property boost

Returns:

  • (Float)


17939
17940
17941
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 17939

def boost
  @boost
end

#conditionString

An expression which specifies a boost condition. The syntax is the same as filter expression syntax. Currently, the only supported condition is a list of BCP-47 lang codes. Example: * To boost suggestions in languages en or fr: (lang_code: ANY("en", "fr")) Corresponds to the JSON property condition

Returns:

  • (String)


17948
17949
17950
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 17948

def condition
  @condition
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



17955
17956
17957
17958
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 17955

def update!(**args)
  @boost = args[:boost] if args.key?(:boost)
  @condition = args[:condition] if args.key?(:condition)
end