java.lang.Object | |||
↳ | org.apache.lucene.index.TermEnum | ||
↳ | org.apache.lucene.search.FilteredTermEnum | ||
↳ | org.apache.lucene.search.FuzzyTermEnum |
Subclass of FilteredTermEnum for enumerating all terms that are similar to the specified filter term.
Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.search.FilteredTermEnum
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a FuzzyTermEnum with an empty prefix and a minSimilarity of 0.5f.
| |||||||||||
Creates a FuzzyTermEnum with an empty prefix.
| |||||||||||
Constructor for enumeration of all terms from specified
reader which share a prefix of
length prefixLength with term and which have a fuzzy similarity >
minSimilarity . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Closes the enumeration to further activity, freeing resources.
| |||||||||||
Equality measure on the term
| |||||||||||
Indicates the end of the enumeration has been reached
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The termCompare method in FuzzyTermEnum uses Levenshtein distance to
calculate the distance between the given term and the comparing term.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.search.FilteredTermEnum
| |||||||||||
From class
org.apache.lucene.index.TermEnum
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.io.Closeable
|
Creates a FuzzyTermEnum with an empty prefix and a minSimilarity of 0.5f.
After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.
IOException | |
IOException |
Creates a FuzzyTermEnum with an empty prefix.
After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.
IOException | |
IOException |
Constructor for enumeration of all terms from specified reader
which share a prefix of
length prefixLength
with term
and which have a fuzzy similarity >
minSimilarity
.
After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.
reader | Delivers terms. |
---|---|
term | Pattern term. |
minSimilarity | Minimum required similarity for terms from the reader. Default value is 0.5f. |
prefixLength | Length of required common prefix. Default value is 0. |
IOException |
---|
Closes the enumeration to further activity, freeing resources.
IOException |
---|
Equality measure on the term
Indicates the end of the enumeration has been reached
The termCompare method in FuzzyTermEnum uses Levenshtein distance to calculate the distance between the given term and the comparing term.