private class FuzzyTermsEnum.AutomatonFuzzyTermsEnum extends FilteredTermsEnum
This is the fastest method as opposed to LinearFuzzyTermsEnum: as enumeration is logarithmic to the number of terms (instead of linear) and comparison is linear to length of the term (rather than quadratic)
FilteredTermsEnum.AcceptStatus
TermsEnum.SeekStatus
Modifier and Type | Field and Description |
---|---|
private BoostAttribute |
boostAtt |
private ByteRunAutomaton[] |
matchers |
private BytesRef |
termRef |
actualTerm, tenum
Constructor and Description |
---|
AutomatonFuzzyTermsEnum(TermsEnum tenum,
CompiledAutomaton[] compiled) |
Modifier and Type | Method and Description |
---|---|
protected FilteredTermsEnum.AcceptStatus |
accept(BytesRef term)
finds the smallest Lev(n) DFA that accepts the term.
|
(package private) boolean |
matches(BytesRef term,
int k)
returns true if term is within k edits of the query term
|
attributes, docFreq, next, nextSeekTerm, ord, postings, seekCeil, seekExact, seekExact, seekExact, setInitialSeekTerm, term, termState, totalTermFreq
private final ByteRunAutomaton[] matchers
private final BytesRef termRef
private final BoostAttribute boostAtt
public AutomatonFuzzyTermsEnum(TermsEnum tenum, CompiledAutomaton[] compiled)
protected FilteredTermsEnum.AcceptStatus accept(BytesRef term)
accept
in class FilteredTermsEnum
final boolean matches(BytesRef term, int k)