org.apache.lucene.search
Class PrefixTermEnum
java.lang.Object
org.apache.lucene.index.TermEnum
org.apache.lucene.search.FilteredTermEnum
org.apache.lucene.search.PrefixTermEnum
- All Implemented Interfaces:
- Closeable
public class PrefixTermEnum
- extends FilteredTermEnum
Subclass of FilteredTermEnum for enumerating all terms that match the
specified prefix filter term.
Term enumerations are always ordered by Term.compareTo(). Each term in
the enumeration is greater than all that precede it.
Method Summary |
float |
difference()
Equality measure on the term |
protected boolean |
endEnum()
Indicates the end of the enumeration has been reached |
protected Term |
getPrefixTerm()
|
protected boolean |
termCompare(Term term)
Equality compare on the term |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrefixTermEnum
public PrefixTermEnum(IndexReader reader,
Term prefix)
throws IOException
- Throws:
IOException
difference
public float difference()
- Description copied from class:
FilteredTermEnum
- Equality measure on the term
- Specified by:
difference
in class FilteredTermEnum
endEnum
protected boolean endEnum()
- Description copied from class:
FilteredTermEnum
- Indicates the end of the enumeration has been reached
- Specified by:
endEnum
in class FilteredTermEnum
getPrefixTerm
protected Term getPrefixTerm()
termCompare
protected boolean termCompare(Term term)
- Description copied from class:
FilteredTermEnum
- Equality compare on the term
- Specified by:
termCompare
in class FilteredTermEnum
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.