🎉 Try the public beta of the new docs site at algolia.com/doc-beta! 🎉
API Reference / API Parameters / minWordSizefor2Typos
Type: integer
Engine default: 8
Formerly: minWordSizeForApprox2
Parameter syntax
'minWordSizefor2Typos' => min_word_size

Can be used in these methods:

About this parameter

The minimum number of characters in a query word before two typos are considered.

Changing this setting to a lower value than the default (8) can lead to many more matches, which might reduce relevance for short queries.

Examples

Set the default minimum character count to allow two typos

1
2
3
$index->setSettings([
  'minWordSizefor2Typos' => 4
]);
1
2
3
$results = $index->search('query', [
  'minWordSizefor2Typos' => 2
]);
Did you find this page helpful?