public class

SingleTermEnum

extends FilteredTermEnum
java.lang.Object
   ↳ org.apache.lucene.index.TermEnum
     ↳ org.apache.lucene.search.FilteredTermEnum
       ↳ org.apache.lucene.search.SingleTermEnum

Class Overview

Subclass of FilteredTermEnum for enumerating a single term.

This can be used by MultiTermQuerys that need only visit one term, but want to preserve MultiTermQuery semantics such as rewriteMethod.

Summary

[Expand]
Inherited Fields
From class org.apache.lucene.search.FilteredTermEnum
Public Constructors
SingleTermEnum(IndexReader reader, Term singleTerm)
Creates a new SingleTermEnum.
Public Methods
float difference()
Equality measure on the term
Protected Methods
boolean endEnum()
Indicates the end of the enumeration has been reached
boolean termCompare(Term term)
Equality compare on the term
[Expand]
Inherited Methods
From class org.apache.lucene.search.FilteredTermEnum
From class org.apache.lucene.index.TermEnum
From class java.lang.Object
From interface java.io.Closeable

Public Constructors

public SingleTermEnum (IndexReader reader, Term singleTerm)

Creates a new SingleTermEnum.

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

Throws
IOException

Public Methods

public float difference ()

Equality measure on the term

Protected Methods

protected boolean endEnum ()

Indicates the end of the enumeration has been reached

protected boolean termCompare (Term term)

Equality compare on the term