## 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

    public class TermRangeTermsEnum

extends FilteredTermsEnum

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.FilteredTermsEnum
`FilteredTermsEnum.AcceptStatus`

Nested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum
`TermsEnum.SeekStatus`

Field Summary

Fields inherited from class org.apache.lucene.index.TermsEnum
`EMPTY`

Constructor Summary
`TermRangeTermsEnum(TermsEnum tenum, BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper)` Enumerates all terms greater/equal than `lowerTerm` but less/equal than `upperTerm`.

Method Summary
`protected FilteredTermsEnum.AcceptStatus` `accept(BytesRef term)` Return if term is accepted, not accepted or the iteration should ended (and possibly seek).

Methods inherited from class org.apache.lucene.index.FilteredTermsEnum
`attributes, docFreq, docs, docsAndPositions, getComparator, next, nextSeekTerm, ord, seekCeil, seekExact, seekExact, seekExact, setInitialSeekTerm, term, termState, totalTermFreq`

Methods inherited from class org.apache.lucene.index.TermsEnum
`docs, docsAndPositions, seekCeil`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TermRangeTermsEnum

    public TermRangeTermsEnum(TermsEnum tenum,
                              BytesRef lowerTerm,
                              BytesRef upperTerm,
                              boolean includeLower,
                              boolean includeUpper)

  Enumerates all terms greater/equal than `lowerTerm` but less/equal than `upperTerm`. 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 filter
    `lowerTerm` - The term text at the lower end of the range
    `upperTerm` - The term text at the upper end of the range
    `includeLower` - If true, the `lowerTerm` is included in the range.
    `includeUpper` - If true, the `upperTerm` is included in the range.

Method Detail

### accept

    protected FilteredTermsEnum.AcceptStatus accept(BytesRef term)

  Description copied from class: `FilteredTermsEnum`
  Return if term is accepted, not accepted or the iteration should ended (and possibly seek).

  Specified by:
    `accept` in class `FilteredTermsEnum`

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.