API Reference / API Parameters / disableExactOnAttributes
Jan. 14, 2019

disableExactOnAttributes

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

Can be used in these methods:

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

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

Did you find this page helpful?