Skip to main content
This parameter controls if Algolia considers matches with typos when searching, and how aggressively. To learn more, see Configuring typo tolerance.

Usage

By default, Algolia matches query terms at the beginning of words in your records (prefix matching). For alternatives, see Match queries in the middle or end of words.

Options

true | "true"
Typo tolerance is enabled for all attributes and query words (default behavior). Accepts both true (boolean) and "true" (string). Also enables splitting and concatenation.
false | "false"
Typo tolerance is off. Only exact matches will be returned. Accepts both false (boolean) and "false" (string).
min
Applies typo tolerance but returns only the records with the fewest typos. For example, if results include matches with one and two typos, only those with one typo are returned. Also enables splitting and concatenation.
strict
Like "min", but includes results with the fewest and second fewest typos. Also forces the Typo ranking criterion to be evaluated first in the ranking formula. Also enables splitting and concatenation.

Examples

Current API clients

Set default typo tolerance mode

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

Set default typo tolerance mode

IndexSettings settings = new IndexSettings();
settings.TypoTolerance = true;
// settings.TypoTolerance = false;
// settings.TypoTolerance = "min";
// settings.TypoTolerance = "strict";

Override default typo tolerance mode for the current search

index.Search(new Query("query")
{
    TypoTolerance = true
    // TypoTolerance = false
    // TypoTolerance = "min"
    // TypoTolerance = "strict"
});
I