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", theCondition.query_termsis
"shoes", theForceReturnFacetAction.FacetPositionAdjustment.attribute_nameis "size" and theForceReturnFacetAction.FacetPositionAdjustment.positionis 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.
Generated from protobuf messagegoogle.cloud.retail.v2.Rule.ForceReturnFacetAction
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Retail V2 Client - Class ForceReturnFacetAction (2.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.1 (latest)](/php/docs/reference/cloud-retail/latest/V2.Rule.ForceReturnFacetAction)\n- [2.3.0](/php/docs/reference/cloud-retail/2.3.0/V2.Rule.ForceReturnFacetAction)\n- [2.2.1](/php/docs/reference/cloud-retail/2.2.1/V2.Rule.ForceReturnFacetAction)\n- [2.1.3](/php/docs/reference/cloud-retail/2.1.3/V2.Rule.ForceReturnFacetAction)\n- [2.0.0](/php/docs/reference/cloud-retail/2.0.0/V2.Rule.ForceReturnFacetAction)\n- [1.7.0](/php/docs/reference/cloud-retail/1.7.0/V2.Rule.ForceReturnFacetAction)\n- [1.6.4](/php/docs/reference/cloud-retail/1.6.4/V2.Rule.ForceReturnFacetAction)\n- [1.5.0](/php/docs/reference/cloud-retail/1.5.0/V2.Rule.ForceReturnFacetAction)\n- [1.4.2](/php/docs/reference/cloud-retail/1.4.2/V2.Rule.ForceReturnFacetAction)\n- [1.3.1](/php/docs/reference/cloud-retail/1.3.1/V2.Rule.ForceReturnFacetAction)\n- [1.2.1](/php/docs/reference/cloud-retail/1.2.1/V2.Rule.ForceReturnFacetAction)\n- [1.1.1](/php/docs/reference/cloud-retail/1.1.1/V2.Rule.ForceReturnFacetAction)\n- [1.0.1](/php/docs/reference/cloud-retail/1.0.1/V2.Rule.ForceReturnFacetAction) \nReference documentation and code samples for the Google Cloud Retail V2 Client class ForceReturnFacetAction.\n\nForce returns an attribute/facet in the request around a certain position\nor above.\n\n- Rule Condition: Must specify non-empty [Condition.query_terms](/php/docs/reference/cloud-retail/latest/V2.Condition#_Google_Cloud_Retail_V2_Condition__getQueryTerms__) (for search only) or [Condition.page_categories](/php/docs/reference/cloud-retail/latest/V2.Condition#_Google_Cloud_Retail_V2_Condition__getPageCategories__) (for browse only), but can't specify both.\n- Action Inputs: attribute name, position\n- 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](/php/docs/reference/cloud-retail/latest/V2.Condition#_Google_Cloud_Retail_V2_Condition__getQueryTerms__) is \"shoes\", the [ForceReturnFacetAction.FacetPositionAdjustment.attribute_name](/php/docs/reference/cloud-retail/latest/V2.Rule.ForceReturnFacetAction.FacetPositionAdjustment#_Google_Cloud_Retail_V2_Rule_ForceReturnFacetAction_FacetPositionAdjustment__getAttributeName__) is \"size\" and the [ForceReturnFacetAction.FacetPositionAdjustment.position](/php/docs/reference/cloud-retail/latest/V2.Rule.ForceReturnFacetAction.FacetPositionAdjustment#_Google_Cloud_Retail_V2_Rule_ForceReturnFacetAction_FacetPositionAdjustment__getPosition__) 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.\n\nGenerated from protobuf message `google.cloud.retail.v2.Rule.ForceReturnFacetAction`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Retail \\\\ V2 \\\\ Rule\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getFacetPositionAdjustments\n\nEach instance corresponds to a force return attribute for the given\ncondition. There can't be more 15 instances here.\n\n### setFacetPositionAdjustments\n\nEach instance corresponds to a force return attribute for the given\ncondition. There can't be more 15 instances here."]]