SingleTermsEnum

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.

Constructors

Link copied to clipboard
constructor(tenum: TermsEnum, termText: BytesRef?)

Functions

Link copied to clipboard
open override fun attributes(): AttributeSource

Returns the related attributes, the returned AttributeSource is shared with the delegate TermsEnum.

Link copied to clipboard
open override fun docFreq(): Int

Returns the number of documents containing the current term. Do not call this when the enum is unpositioned. SeekStatus.END.

Link copied to clipboard
open override fun impacts(flags: Int): ImpactsEnum

Return a ImpactsEnum.

Link copied to clipboard
open override fun next(): BytesRef?

Increments the iteration to the next BytesRef in the iterator. Returns the resulting BytesRef or null if the end of the iterator is reached. The returned BytesRef may be re-used across calls to next. After this method returns null, do not call it again: the results are undefined.

Link copied to clipboard
open override fun ord(): Long

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.

Link copied to clipboard
open override fun postings(reuse: PostingsEnum?, flags: Int): PostingsEnum?

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.

Get PostingsEnum for the current term. Do not call this when the enum is unpositioned. This method will not return null.

Link copied to clipboard
open override fun prepareSeekExact(text: BytesRef): IOBooleanSupplier

This enum does not support seeking!

Link copied to clipboard
open override fun seekCeil(term: BytesRef): TermsEnum.SeekStatus

This enum does not support seeking!

Link copied to clipboard
open override fun seekExact(ord: Long)
open override fun seekExact(term: BytesRef): Boolean
open override fun seekExact(term: BytesRef, state: TermState)

This enum does not support seeking!

Link copied to clipboard
open override fun term(): BytesRef?

Returns current term. Do not call this when the enum is unpositioned.

Link copied to clipboard
open override fun termState(): TermState

Returns the filtered enums term state

Link copied to clipboard
open override fun totalTermFreq(): Long

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.