numericAttributesForFiltering
'numericAttributesForFiltering' => [ 'attribute1', 'equalOnly(attribute2)' ]
Can be used in these methods:
setSettings
set_settings
setSettings
set_settings
setSettings
setSettings
SetSettings
setSettings
SetSettings
setSettings
About this parameter
List of numeric attributes that can be used as numerical filters.
By default, all numeric attributes are automatically indexed and available as numerical filters. For faster indexing, it is best to reduce the number of numeric attributes used for filtering. This setting enables you to do this.
Usage notes
- If a list of attributes is specified, only those attributes listed are available as numerical filters.
- If you provide an empty list or
null
, then all numeric attributes are filterable. - If you want to disable filtering for all numeric attributes, specify an attribute that does not exist, e.g.
_no_numeric_attributes_
. - Attribute names are case-sensitive
Modifiers
|
If you only need to filter on a numeric value based on equality (i.e. with the operators |
Examples
Set list of numeric attributes that can be used as numerical filters.
1
2
3
4
5
6
$index->setSettings([
'numericAttributesForFiltering' => [
'quantity',
'popularity'
]
]);