disableExactOnAttributes
[]
'disableExactOnAttributes' => [ 'attribute', ... ]
Can be used in these methods:
search,
setSettings,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
set_settings,
browse,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
setSettings,
browse,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
set_settings,
browse_objects,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
setSettings,
browse,
searchForFacetValues
search,
setSettings,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
searchAsync,
setSettingsAsync,
browseAsync,
searchForFacetValues
Search,
SetSettings,
Browse,
SearchForFacetValues,
GenerateSecuredApiKey,
AddApiKey,
UpdateApiKey
Search,
setSettings,
browse,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
Search,
SetSettings,
BrowseObjects,
SearchForFacetValues,
GenerateSecuredAPIKey,
AddAPIKey,
UpdateAPIKey
search,
setSettings,
browse index,
search into facet values,
generateSecuredApiKey,
add key,
update key
About this parameter
List of attributes on which you want to disable the exact
ranking criterion.
Usage notes:
-
The list must be a subset of the searchableAttributes index setting.
-
searchableAttributes
must not be empty nor null fordisableExactOnAttributes
to be applied.
Examples
Disable exact ranking criterion for some attributes by default
1
2
3
4
5
$index->setSettings([
'disableExactOnAttributes' => [
'keywords',
]
]);
Disable exact ranking criterion for some attributes for the current search
1
2
3
4
5
$results = $index->search('query', [
'disableExactOnAttributes' => [
'keywords'
]
]);