BaseTermsEnum
A base TermsEnum that adds default implementations for
.attributes
.termState
.seekExact
.seekExact
In some cases, the default implementation may be slow and consume huge memory, so subclass SHOULD have its own implementation if possible.
Inheritors
Functions
Returns the related attributes.
Returns the number of documents containing the current term. Do not call this when the enum is unpositioned. SeekStatus.END.
Return a ImpactsEnum.
Returns ordinal position for current term. This is an optional method (the codec may throw UnsupportedOperationException). Do not call this when the enum is unpositioned.
Get PostingsEnum for the current term. Do not call this when the enum is unpositioned. This method will not return null.
Get PostingsEnum for the current term, with control over whether freqs, positions, offsets or payloads are required. Do not call this when the enum is unpositioned. This method will not return null.
Two-phase .seekExact. The first phase typically calls IndexInput.prefetch on the right range of bytes under the hood, while the second phase IOBooleanSupplier.get actually seeks the term within these bytes. This can be used to parallelize I/O across multiple terms by calling .prepareSeekExact on multiple terms enums before calling .
Seeks to the specified term, if it exists, or to the next (ceiling) term. Returns SeekStatus to indicate whether exact term was found, a different term was found, or EOF was hit. The target term may be before or after the current term. If this returns SeekStatus.END, the enum is unpositioned.
Attempts to seek to the exact term, returning true if the term is found. If this returns false, the enum is unpositioned. For some codecs, seekExact may be substantially faster than .seekCeil.
Expert: Seeks a specific position by TermState previously obtained from .termState. Callers should maintain the TermState to use this method. Low-level implementations may position the TermsEnum without re-seeking the term dictionary.
Seeks to the specified term by ordinal (position) as previously returned by .ord. The target ord may be before or after the current ord, and must be within bounds.
Returns the total number of occurrences of this term across all documents (the sum of the freq() for each doc that has this term). Note that, like other term measures, this measure does not take deleted documents into account.