Package 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
,AutoCloseable
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.
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.search.FilteredTermEnum
actualEnum, currentTerm
-
-
Constructor Summary
Constructors Constructor Description PrefixTermEnum(IndexReader reader, Term prefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
difference()
Equality measure on the termprotected boolean
endEnum()
Indicates the end of the enumeration has been reachedprotected Term
getPrefixTerm()
protected boolean
termCompare(Term term)
Equality compare on the term
-
-
-
Constructor Detail
-
PrefixTermEnum
public PrefixTermEnum(IndexReader reader, Term prefix) throws IOException
- Throws:
IOException
-
-
Method Detail
-
difference
public float difference()
Description copied from class:FilteredTermEnum
Equality measure on the term- Specified by:
difference
in classFilteredTermEnum
-
endEnum
protected boolean endEnum()
Description copied from class:FilteredTermEnum
Indicates the end of the enumeration has been reached- Specified by:
endEnum
in classFilteredTermEnum
-
getPrefixTerm
protected Term getPrefixTerm()
-
termCompare
protected boolean termCompare(Term term)
Description copied from class:FilteredTermEnum
Equality compare on the term- Specified by:
termCompare
in classFilteredTermEnum
-
-