Retail v2 API - Class Rule.Types.ForceReturnFacetAction (2.12.0)

public sealed class Rule.Types.ForceReturnFacetAction : IMessage<Rule.Types.ForceReturnFacetAction>, IEquatable<Rule.Types.ForceReturnFacetAction>, IDeepCloneable<Rule.Types.ForceReturnFacetAction>, IBufferMessage, IMessage

Reference documentation and code samples for the Retail v2 API class Rule.Types.ForceReturnFacetAction.

Force returns an attribute/facet in the request around a certain position or above.

  • Rule Condition: Must specify non-empty [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] (for search only) or [Condition.page_categories][google.cloud.retail.v2.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][google.cloud.retail.v2.Condition.query_terms] is "shoes", the [ForceReturnFacetAction.FacetPositionAdjustment.attribute_name][google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment.attribute_name] is "size" and the [ForceReturnFacetAction.FacetPositionAdjustment.position][google.cloud.retail.v2.Rule.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.

Inheritance

object > Rule.Types.ForceReturnFacetAction

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Constructors

ForceReturnFacetAction()

public ForceReturnFacetAction()

ForceReturnFacetAction(ForceReturnFacetAction)

public ForceReturnFacetAction(Rule.Types.ForceReturnFacetAction other)
Parameter
Name Description
other RuleTypesForceReturnFacetAction

Properties

FacetPositionAdjustments

public RepeatedField<Rule.Types.ForceReturnFacetAction.Types.FacetPositionAdjustment> FacetPositionAdjustments { get; }

Each instance corresponds to a force return attribute for the given condition. There can't be more 15 instances here.

Property Value
Type Description
RepeatedFieldRuleTypesForceReturnFacetActionTypesFacetPositionAdjustment