public sealed class Rule : IMessage<Rule>, IEquatable<Rule>, IDeepCloneable<Rule>, IBufferMessage, IMessage
Reference documentation and code samples for the Retail v2 API class Rule.
A rule is a condition-action pair
- A condition defines when a rule is to be triggered.
- An action specifies what occurs on that trigger. Currently rules only work for [controls][google.cloud.retail.v2.Control] with [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2.SolutionType.SOLUTION_TYPE_SEARCH].
Namespace
Google.Cloud.Retail.V2Assembly
Google.Cloud.Retail.V2.dll
Constructors
Rule()
public Rule()
Rule(Rule)
public Rule(Rule other)
Parameter | |
---|---|
Name | Description |
other | Rule |
Properties
ActionCase
public Rule.ActionOneofCase ActionCase { get; }
Property Value | |
---|---|
Type | Description |
Rule.ActionOneofCase |
BoostAction
public Rule.Types.BoostAction BoostAction { get; set; }
A boost action.
Property Value | |
---|---|
Type | Description |
Rule.Types.BoostAction |
Condition
public Condition Condition { get; set; }
Required. The condition that triggers the rule. If the condition is empty, the rule will always apply.
Property Value | |
---|---|
Type | Description |
Condition |
DoNotAssociateAction
public Rule.Types.DoNotAssociateAction DoNotAssociateAction { get; set; }
Prevents term from being associated with other terms.
Property Value | |
---|---|
Type | Description |
Rule.Types.DoNotAssociateAction |
FilterAction
public Rule.Types.FilterAction FilterAction { get; set; }
Filters results.
Property Value | |
---|---|
Type | Description |
Rule.Types.FilterAction |
IgnoreAction
public Rule.Types.IgnoreAction IgnoreAction { get; set; }
Ignores specific terms from query during search.
Property Value | |
---|---|
Type | Description |
Rule.Types.IgnoreAction |
OnewaySynonymsAction
public Rule.Types.OnewaySynonymsAction OnewaySynonymsAction { get; set; }
Treats specific term as a synonym with a group of terms. Group of terms will not be treated as synonyms with the specific term.
Property Value | |
---|---|
Type | Description |
Rule.Types.OnewaySynonymsAction |
RedirectAction
public Rule.Types.RedirectAction RedirectAction { get; set; }
Redirects a shopper to a specific page.
Property Value | |
---|---|
Type | Description |
Rule.Types.RedirectAction |
ReplacementAction
public Rule.Types.ReplacementAction ReplacementAction { get; set; }
Replaces specific terms in the query.
Property Value | |
---|---|
Type | Description |
Rule.Types.ReplacementAction |
TwowaySynonymsAction
public Rule.Types.TwowaySynonymsAction TwowaySynonymsAction { get; set; }
Treats a set of terms as synonyms of one another.
Property Value | |
---|---|
Type | Description |
Rule.Types.TwowaySynonymsAction |