setSeparatorsToIndex method

AlgoliaSettings setSeparatorsToIndex(
  1. String value
)

SeparatorsToIndex

Control which separators are indexed. Separators are all non-alphanumeric characters except space.

Usage notes:

  • By default, separators are not indexed.
  • Here is a non-exhaustive list of separators frequently used by our customers: !#()[]{}*+-_一,:;<>?@/\^|%&~£¥$§€`''‘’“”†‡
  • The search API treats separator characters as separate words. If you search “Google+” for example, the search API considers “Google” and “+” as two separate words, and counts as a match on two words in getRankingInfo.

Source: Learn more

Implementation

AlgoliaSettings setSeparatorsToIndex(String value) {
  assert(value.isNotEmpty);
  assert(!_parameters.containsKey('separatorsToIndex'));
  return _copyWithParameters(<String, dynamic>{'separatorsToIndex': value});
}