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 separators are indexed.
Separators are all non-letter characters except spaces and currency characters, such as $€£¥.
Usage notes
-
By default, separators are not indexed.
-
Frequently used separators include these characters:
!#()[]{}*+-_一,:;<>?@/\^|%&~£¥$§€`"'‘’“”†‡
-
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
.
Examples
Set list separators to index
To search for “Google+” or “C#”, include +
and #
in the separatorsToIndex
setting.
1
2
3
$index->setSettings([
'separatorsToIndex' => '+#'
]);