| org.apache.lucene.search.FilteredTermEnum org.apache.lucene.search.FuzzyTermEnum
FuzzyTermEnum | final public class FuzzyTermEnum extends FilteredTermEnum (Code) | | Subclass of FilteredTermEnum for enumerating all terms that are similiar
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.
|
Constructor Summary | |
public | FuzzyTermEnum(IndexReader reader, Term term) 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. | public | FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity) 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. | public | FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity, int prefixLength) 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. |
Method Summary | |
public void | close() | final public float | difference() | final public boolean | endEnum() | final protected boolean | termCompare(Term term) The termCompare method in FuzzyTermEnum uses Levenshtein distance to
calculate the distance between the given term and the comparing term. |
FuzzyTermEnum | public FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity, int prefixLength) throws IOException(Code) | | 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.
Parameters: reader - Delivers terms. Parameters: term - Pattern term. Parameters: minSimilarity - Minimum required similarity for terms from the reader. Default value is 0.5f. Parameters: prefixLength - Length of required common prefix. Default value is 0. throws: IOException - |
difference | final public float difference()(Code) | | |
endEnum | final public boolean endEnum()(Code) | | |
termCompare | final protected boolean termCompare(Term term)(Code) | | The termCompare method in FuzzyTermEnum uses Levenshtein distance to
calculate the distance between the given term and the comparing term.
|
|
|