Tachyontachyon

Typo Tolerance

How Tachyon matches misspelled queries, and how to tune it.

Tachyon tolerates typos using Damerau-Levenshtein edit distance, with the allowed number of edits scaled to query-token length so short words aren't matched too loosely.

Collection-level configuration

Set at collection creation time, under typo_tolerance in the schema:

{
  "typo_tolerance": {
    "enabled": true,
    "one_typo_min_len": 4,
    "two_typo_min_len": 8,
    "max_typos": 2
  }
}
FieldDefaultMeaning
enabledtrueWhether typo tolerance is applied at all
one_typo_min_len4Token length at which 1 typo becomes allowed
two_typo_min_len8Token length at which 2 typos become allowed
max_typos2Hard ceiling on allowed edits, regardless of length
curl -X POST localhost:8108/collections \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "products",
    "fields": [{"name": "title", "type": "text"}],
    "typo_tolerance": {
      "enabled": true,
      "one_typo_min_len": 4,
      "two_typo_min_len": 8,
      "max_typos": 2
    }
  }'

A token shorter than one_typo_min_len must match exactly. Between one_typo_min_len and two_typo_min_len, one edit is allowed. At or above two_typo_min_len, two edits are allowed — capped by max_typos.

Per-query override

A single query can only toggle typo tolerance on or off — the length thresholds are fixed at the collection level and can't be overridden per request:

curl 'localhost:8108/collections/products/search?q=keyboard&typo_tolerance=false'

If omitted, the collection's typo_tolerance.enabled setting is used.

On this page