API Reference / API Parameters / disableExactOnAttributes
Feb. 26, 2019

disableExactOnAttributes

Type: list of strings
Engine default: []
Parameter syntax
'disableExactOnAttributes' => [
  'attribute',
  ...
]

Can be used in these methods:
search, setSettings, browseObjects, searchForFacetValues, generateSecuredApiKey, addApiKey, updateApiKey

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 for disableExactOnAttributes to be applied.

Examples#

Disable exact ranking criterion for some attributes by default#

Edit
1
2
3
4
5
$index->setSettings([
  'disableExactOnAttributes' => [
    'keywords',
  ]
]);

Disable exact ranking criterion for some attributes for the current search#

Edit
1
2
3
4
5
$results = $index->search('query', [
  'disableExactOnAttributes' => [
    'keywords'
  ]
]);

Did you find this page helpful?

PHP