java.lang.Object
org.apache.lucene.index.TermsEnum
org.apache.lucene.index.FilteredTermsEnum
org.elasticsearch.index.mapper.SearchAfterTermsEnum
- All Implemented Interfaces:
org.apache.lucene.util.BytesRefIterator
public final class SearchAfterTermsEnum
extends org.apache.lucene.index.FilteredTermsEnum
This terms enumeration initializes with a seek to a given term but excludes that term
from any results. The problem it addresses is that termsEnum.seekCeil()
would work but either leaves us positioned on the seek term (if it exists) or the
term after (if the seek term doesn't exist). That complicates any subsequent
iteration logic so this class simplifies the pagination use case.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.FilteredTermsEnum
org.apache.lucene.index.FilteredTermsEnum.AcceptStatusNested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum
org.apache.lucene.index.TermsEnum.SeekStatus -
Field Summary
Fields inherited from class org.apache.lucene.index.FilteredTermsEnum
actualTerm, tenumFields inherited from class org.apache.lucene.index.TermsEnum
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionSearchAfterTermsEnum(org.apache.lucene.index.TermsEnum tenum, org.apache.lucene.util.BytesRef termText) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.lucene.index.FilteredTermsEnum.AcceptStatusaccept(org.apache.lucene.util.BytesRef term) Methods inherited from class org.apache.lucene.index.FilteredTermsEnum
attributes, docFreq, impacts, next, nextSeekTerm, ord, postings, prepareSeekExact, seekCeil, seekExact, seekExact, seekExact, setInitialSeekTerm, term, termState, totalTermFreqMethods inherited from class org.apache.lucene.index.TermsEnum
postings
-
Constructor Details
-
SearchAfterTermsEnum
public SearchAfterTermsEnum(org.apache.lucene.index.TermsEnum tenum, org.apache.lucene.util.BytesRef termText)
-
-
Method Details
-
accept
protected org.apache.lucene.index.FilteredTermsEnum.AcceptStatus accept(org.apache.lucene.util.BytesRef term) - Specified by:
acceptin classorg.apache.lucene.index.FilteredTermsEnum
-