Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAdvancedCompleteQueryRequestBoostSpecConditionBoostSpec
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAdvancedCompleteQueryRequestBoostSpecConditionBoostSpec
- 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
Boost applies to suggestions which match a condition.
Instance Attribute Summary collapse
-
#boost ⇒ Float
Strength of the boost, which should be in [-1, 1].
-
#condition ⇒ String
An expression which specifies a boost condition.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaAdvancedCompleteQueryRequestBoostSpecConditionBoostSpec
constructor
A new instance of GoogleCloudDiscoveryengineV1alphaAdvancedCompleteQueryRequestBoostSpecConditionBoostSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaAdvancedCompleteQueryRequestBoostSpecConditionBoostSpec
Returns a new instance of GoogleCloudDiscoveryengineV1alphaAdvancedCompleteQueryRequestBoostSpecConditionBoostSpec.
3917 3918 3919 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3917 def initialize(**args) update!(**args) end |
Instance Attribute Details
#boost ⇒ Float
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
3906 3907 3908 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3906 def boost @boost end |
#condition ⇒ String
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
3915 3916 3917 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3915 def condition @condition end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3922 3923 3924 3925 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3922 def update!(**args) @boost = args[:boost] if args.key?(:boost) @condition = args[:condition] if args.key?(:condition) end |