Package org.apache.lucene.search
Class TermRangeTermsEnum
java.lang.Object
org.apache.lucene.index.TermsEnum
org.apache.lucene.index.FilteredTermsEnum
org.apache.lucene.search.TermRangeTermsEnum
- All Implemented Interfaces:
BytesRefIterator
Subclass of FilteredTermEnum for enumerating all terms that match the
specified range parameters.
Term enumerations are always ordered by
FilteredTermsEnum.getComparator(). Each term in the enumeration is
greater than all that precede it.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum
TermsEnum.SeekStatus -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTermRangeTermsEnum(TermsEnum tenum, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper) Enumerates all terms greater/equal thanlowerTermbut less/equal thanupperTerm. -
Method Summary
Methods inherited from class org.apache.lucene.index.FilteredTermsEnum
attributes, docFreq, docs, docsAndPositions, getComparator, next, ord, seekCeil, seekExact, seekExact, seekExact, term, termState, totalTermFreqMethods inherited from class org.apache.lucene.index.TermsEnum
docs, docsAndPositions
-
Constructor Details
-
TermRangeTermsEnum
public TermRangeTermsEnum(TermsEnum tenum, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper) Enumerates all terms greater/equal thanlowerTermbut less/equal thanupperTerm. If an endpoint is null, it is said to be "open". Either or both endpoints may be open. Open endpoints may not be exclusive (you can't select all but the first or last term without explicitly specifying the term to exclude.)- Parameters:
tenum- TermsEnum to filterlowerTerm- The term text at the lower end of the rangeupperTerm- The term text at the upper end of the rangeincludeLower- If true, thelowerTermis included in the range.includeUpper- If true, theupperTermis included in the range.
-