Class SingleTermsEnum

All Implemented Interfaces:
BytesRefIterator

public final class SingleTermsEnum extends FilteredTermsEnum
Subclass of FilteredTermsEnum for enumerating a single term.

For example, this can be used by MultiTermQuerys that need only visit one term, but want to preserve MultiTermQuery semantics such as MultiTermQuery.getRewriteMethod().

  • Constructor Details

    • SingleTermsEnum

      public SingleTermsEnum(TermsEnum tenum, BytesRef termText)
      Creates a new SingleTermsEnum.

      After calling the constructor the enumeration is already pointing to the term, if it exists.

  • Method Details