The Fuzzy Query generates matching terms that are within the maximum edit
distance specified in
_fuzziness (defaults to 2) and then checks the term
dictionary to find out which of those generated terms actually exist in the
index. The final query uses up to
_max_expansions (defaults to 50) matching
A similar effect could be obtained by using the tilde (“
followed optionally by the edit distance as part of the query text:
Edit distance defaults to 2, so
"banna~2" are equivalent.
QueryDSL parameters are not implemented yet.
Pull requests are welcome!
The following parameters are accepted by Boolean fields:
||The maximum edit distance. Defaults to
||The maximum number of terms that the fuzzy query will expand to. Defaults to
||The number of initial characters which will not be “fuzzified”. This helps to reduce the number of terms which must be examined. Defaults to
This query can be very heavy if
_prefix_length is set to
0 and if
_max_expansions is set to a high number. It could result in every term
in the index being examined!