Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleForceReturnFacetAction
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleForceReturnFacetAction
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2alpha/classes.rb,
lib/google/apis/retail_v2alpha/representations.rb,
lib/google/apis/retail_v2alpha/representations.rb
Overview
Force returns an attribute/facet in the request around a certain position or above. * Rule Condition: Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Inputs: attribute name, position * Action Result: Will force return a facet key around a certain position or above if the condition is satisfied. Example: Suppose the query is "shoes", the Condition.query_terms is "shoes", the ForceReturnFacetAction.FacetPositionAdjustment.attribute_name is " size" and the ForceReturnFacetAction.FacetPositionAdjustment.position is 8. Two cases: a) The facet key "size" is not already in the top 8 slots, then the facet "size" will appear at a position close to 8. b) The facet key "size" in among the top 8 positions in the request, then it will stay at its current rank.
Instance Attribute Summary collapse
-
#facet_position_adjustments ⇒ Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment>
Each instance corresponds to a force return attribute for the given condition.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2alphaRuleForceReturnFacetAction
constructor
A new instance of GoogleCloudRetailV2alphaRuleForceReturnFacetAction.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2alphaRuleForceReturnFacetAction
Returns a new instance of GoogleCloudRetailV2alphaRuleForceReturnFacetAction.
6265 6266 6267 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 6265 def initialize(**args) update!(**args) end |
Instance Attribute Details
#facet_position_adjustments ⇒ Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment>
Each instance corresponds to a force return attribute for the given condition.
There can't be more 3 instances here.
Corresponds to the JSON property facetPositionAdjustments
6263 6264 6265 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 6263 def facet_position_adjustments @facet_position_adjustments end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6270 6271 6272 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 6270 def update!(**args) @facet_position_adjustments = args[:facet_position_adjustments] if args.key?(:facet_position_adjustments) end |