API Reference / API Parameters / disableTypoToleranceOnAttributes

disableTypoToleranceOnAttributes

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

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

About this parameter# A

List of attributes on which you want to disable typo tolerance.

Usage notes#

  • The list must be a subset of the searchableAttributes index setting.

  • searchableAttributes must not be empty nor null for disableTypoToleranceOnAttributes to be applied.

Examples# A

Disable typo tolerance for some attributes by default#

1
2
3
4
5
$index->setSettings([
  'disableTypoToleranceOnAttributes' => [
    'sku',
  ]
]);

Disable typo tolerance for some attributes for the current search#

1
2
3
4
5
$results = $index->search('query', [
  'disableTypoToleranceOnAttributes' => [
    'sku'
  ]
]);
Did you find this page helpful?
PHP v3