Algolia DevCon
Oct. 2–3 2024, virtual.
API Reference / API Parameters / minWordSizefor1Typo
Type: integer
Engine default: 4
Formerly: minWordSizeForApprox1
Parameter syntax
'minWordSizefor1Typo' => min_word_size

Can be used in these methods:

About this parameter

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

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

Examples

Set the default minimum character count to allow one typo

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