disablePrefixOnAttributes
[]
'disablePrefixOnAttributes' => [ 'attribute', ... ]
Can be used in these methods:
setSettings
set_settings
setSettings
set_settings
setSettings
setSettings
setSettingsAsync
SetSettings
setSettings
SetSettings
setSettings
About this parameter
List of attributes on which you want to disable prefix matching.
This setting is useful on attributes that contain strings that should not be matched as a prefix (for example a product SKU).
Usage notes:
- The list must be a subset of the searchableAttributes index setting.
searchableAttributesmust not be empty nor null fordisablePrefixOnAttributesto be applied.
Examples
Disable prefix search for some attributes by default
1
2
3
4
5
$index->setSettings([
'disablePrefixOnAttributes' => [
'sku',
]
]);