Skip to main content
  • Type: integer
  • Default: 4
  • Scope: settings,search
  • Deprecated name: minWordSizeForApprox1
The minWordSizefor1Typo parameter sets the minimum length a query word must have before Algolia allows one typo in that word. Query words shorter than this setting must match exactly. 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 one typo

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

Set the default minimum character count to allow one typo

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

index.SetSettings(settings);

Override the default minimum character count to allow one typo for the current search

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