getFuzzyAutomaton

fun getFuzzyAutomaton(term: String, maxEdits: Int, prefixLength: Int, transpositions: Boolean): CompiledAutomaton

Returns the CompiledAutomaton internally used by FuzzyQuery to match terms. This is a very low-level method and may no longer exist in case the implementation of fuzzy-matching changes in the future.

Return

A CompiledAutomaton that matches terms that satisfy input parameters.

Parameters

term

the term to search for

maxEdits

must be >= 0 and <= .

prefixLength

length of common (non-fuzzy) prefix

transpositions

true if transpositions should be treated as a primitive edit operation. If this is false, comparisons will implement the classic Levenshtein algorithm.