Class: Google::Apis::CesV1::DataStoreToolBoostSpecConditionBoostSpec
- Inherits:
-
Object
- Object
- Google::Apis::CesV1::DataStoreToolBoostSpecConditionBoostSpec
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/ces_v1/classes.rb,
lib/google/apis/ces_v1/representations.rb,
lib/google/apis/ces_v1/representations.rb
Overview
Boost specification for a condition.
Instance Attribute Summary collapse
-
#boost ⇒ Float
Optional.
-
#boost_control_spec ⇒ Google::Apis::CesV1::DataStoreToolBoostSpecConditionBoostSpecBoostControlSpec
Specification for custom ranking based on customer specified attribute value.
-
#condition ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DataStoreToolBoostSpecConditionBoostSpec
constructor
A new instance of DataStoreToolBoostSpecConditionBoostSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DataStoreToolBoostSpecConditionBoostSpec
Returns a new instance of DataStoreToolBoostSpecConditionBoostSpec.
2149 2150 2151 |
# File 'lib/google/apis/ces_v1/classes.rb', line 2149 def initialize(**args) update!(**args) end |
Instance Attribute Details
#boost ⇒ Float
Optional. 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
2132 2133 2134 |
# File 'lib/google/apis/ces_v1/classes.rb', line 2132 def boost @boost end |
#boost_control_spec ⇒ Google::Apis::CesV1::DataStoreToolBoostSpecConditionBoostSpecBoostControlSpec
Specification for custom ranking based on customer specified attribute value.
It provides more controls for customized ranking than the simple (condition,
boost) combination above.
Corresponds to the JSON property boostControlSpec
2139 2140 2141 |
# File 'lib/google/apis/ces_v1/classes.rb', line 2139 def boost_control_spec @boost_control_spec end |
#condition ⇒ String
Required. 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
2147 2148 2149 |
# File 'lib/google/apis/ces_v1/classes.rb', line 2147 def condition @condition end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2154 2155 2156 2157 2158 |
# File 'lib/google/apis/ces_v1/classes.rb', line 2154 def update!(**args) @boost = args[:boost] if args.key?(:boost) @boost_control_spec = args[:boost_control_spec] if args.key?(:boost_control_spec) @condition = args[:condition] if args.key?(:condition) end |