Retail V2 API - Class Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction (v0.21.0)

Reference documentation and code samples for the Retail V2 API class Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction.

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.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#facet_position_adjustments

def facet_position_adjustments() -> ::Array<::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction::FacetPositionAdjustment>
Returns

#facet_position_adjustments=

def facet_position_adjustments=(value) -> ::Array<::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction::FacetPositionAdjustment>
Parameter
Returns