Package com.algolia.model.recommend
Class Condition
java.lang.Object
com.algolia.model.recommend.Condition
Condition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether the pattern should match plurals, synonyms, and typos.Get anchoringAn additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter.Filters that trigger the rule.Query pattern that triggers the rule.int
hashCode()
setAlternatives
(Boolean alternatives) setAnchoring
(Anchoring anchoring) setContext
(String context) setFilters
(String filters) setPattern
(String pattern) toString()
-
Constructor Details
-
Condition
public Condition()
-
-
Method Details
-
setPattern
-
getPattern
Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\". -
setAnchoring
-
getAnchoring
Get anchoring -
setAlternatives
-
getAlternatives
Whether the pattern should match plurals, synonyms, and typos. -
setContext
-
getContext
An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters. -
setFilters
-
getFilters
Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. -
equals
-
hashCode
public int hashCode() -
toString
-