|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 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.
Field Summary | |
static double |
FUZZY_THRESHOLD
Compute Levenshtein distance |
static double |
SCALE_FACTOR
|
Constructor Summary | |
FuzzyTermEnum(IndexReader reader,
Term term)
|
Method Summary | |
void |
close()
Closes the enumeration to further activity, freeing resources. |
protected float |
difference()
Equality measure on the term |
boolean |
endEnum()
Indiciates the end of the enumeration has been reached |
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. |
Methods inherited from class org.apache.lucene.search.FilteredTermEnum |
docFreq, next, setEnum, term |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final double FUZZY_THRESHOLD
public static final double SCALE_FACTOR
Constructor Detail |
public FuzzyTermEnum(IndexReader reader, Term term) throws IOException
Method Detail |
protected final boolean termCompare(Term term)
termCompare
in class FilteredTermEnum
protected final float difference()
FilteredTermEnum
difference
in class FilteredTermEnum
public final boolean endEnum()
FilteredTermEnum
endEnum
in class FilteredTermEnum
public void close() throws IOException
FilteredTermEnum
close
in class FilteredTermEnum
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |