separatorsToIndex
'separatorsToIndex' => 'separators'
Can be used in these methods:
setSettings
set_settings
setSettings
set_settings
setSettings
setSettings
SetSettings
setSettings
SetSettings
setSettings
About this parameter
Control which non-alphanumeric characters are indexed.
By default, Algolia ignores non-alphanumeric characters such as hyphen (-), plus (+), and parentheses ((,)).
To index such characters, define them with separatorsToIndex.
Usage notes
- Separators must be non-letter characters such as:
!#()[]{}*+-_一,:;<>?@/\^|%&~§`"'‘’“”†‡ - Separators may not be spaces or currency characters, such as
$€£¥ - Algolia treats separator characters as separate words.
For example, in a search for “Disney+”, Algolia considers “Disney” and “+” as two separate words,
and counts as a match on two words in
getRankingInfo.
Examples
Create a list of non-alphanumeric characters to index
To search for “+33”, “Disney+”, or “C#”, include + and # in separatorsToIndex.
1
2
3
$index->setSettings([
'separatorsToIndex' => '+#'
]);