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

minWordSizefor2Typos

Type: integer
Engine default: 8
Formerly: minWordSizeForApprox2
Parameter syntax
'minWordSizefor2Typos' => min_word_size

Can be used in these methods:

About this parameter

Minimum number of characters a word in the query string must contain to accept matches with 2 typos.

Examples

Set default min word size to allow 2 typo

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

Did you find this page helpful?