Skip to main content
  • Type: integer
  • Default: 8
  • Scope: settings,search
  • Deprecated name: minWordSizeForApprox2
The minWordSizefor2Typos parameter sets the minimum length a query word must have before Algolia allows two typos in that word. Query words shorter than this setting can only have up to one typo. Lowering this setting can lead to more matches, but might include more irrelevant results for short queries. To learn more, see Configure typo tolerance word size.

Examples

Current API clients

Set the default minimum character count to allow two typos

var response = await client.SetSettingsAsync(
  "ALGOLIA_INDEX_NAME",
  new IndexSettings { MinWordSizefor2Typos = 4 }
);
var response = await client.SearchSingleIndexAsync<Hit>(
  "ALGOLIA_INDEX_NAME",
  new SearchParams(new SearchParamsObject { Query = "query", MinWordSizefor2Typos = 2 })
);

Set the default minimum character count to allow two typos

IndexSettings settings = new IndexSettings();
settings.MinWordSizefor2Typos = 4;

index.SetSettings(settings);

Override the default minimum character count to allow two typos for the current search

index.Search(new Query("query")
{
    MinWordSizefor2Typos = 2
});
I