Condition

algoliasearch.search.Condition
case class Condition(pattern: Option[String], anchoring: Option[Anchoring], alternatives: Option[Boolean], context: Option[String], filters: Option[String])

Condition

Value parameters

alternatives

Whether the pattern should match plurals, synonyms, and typos.

context

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.

filters

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.

pattern

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".

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product