jruby/docs BETA
Navigation
org.apache.lucene.index 131
C AutomatonTermsEnum
C BaseCompositeReader
C BaseTermsEnum
C BinaryDocValues
C ByteVectorValues
C CheckIndex
C CodecReader
C CompositeReader
C CompositeReaderContext
C ConcurrentMergeScheduler
C CorruptIndexException
C DirectoryReader
C DocIDMerger
C DocValues
E DocValuesSkipIndexType
C DocValuesSkipper
E DocValuesType
C DocsWithFieldSet
C EmptyDocValuesProducer
C ExitableDirectoryReader
C FieldInfo
C FieldInfos
C FieldInvertState
C Fields
C FilterBinaryDocValues
C FilterCodecReader
C FilterDirectoryReader
C FilterLeafReader
C FilterMergePolicy
C FilterNumericDocValues
C FilterSortedDocValues
C FilterSortedNumericDocValues
C FilterSortedSetDocValues
C FilteredTermsEnum
C FloatVectorValues
C FreqAndNormBuffer
C Impacts
C ImpactsEnum
I ImpactsSource
C IndexCommit
C IndexDeletionPolicy
C IndexFileNames
C IndexFormatTooNewException
C IndexFormatTooOldException
C IndexNotFoundException
E IndexOptions
C IndexReader
C IndexReaderContext
I IndexSorter
C IndexUpgrader
C IndexWriter
C IndexWriterConfig
I IndexWriterEventListener
I IndexableField
I IndexableFieldType
C KeepLastNCommitsDeletionPolicy
C KeepOnlyLastCommitDeletionPolicy
C KnnVectorValues
C LeafReader
C LeafReaderContext
C LiveIndexWriterConfig
C LogByteSizeMergePolicy
C LogDocMergePolicy
C LogMergePolicy
C MappedMultiFields
C MergePolicy
C MergeRateLimiter
C MergeScheduler
C MergeState
E MergeTrigger
C MultiBits
C MultiDocValues
C MultiFields
C MultiLeafReader
C MultiPostingsEnum
C MultiReader
C MultiTerms
C MultiTermsEnum
C NoDeletionPolicy
C NoMergePolicy
C NoMergeScheduler
C NumericDocValues
C OneMergeWrappingMergePolicy
C OrdTermState
C OrdinalMap
C ParallelCompositeReader
C ParallelLeafReader
C PersistentSnapshotDeletionPolicy
C PointValues
C PostingsEnum
C PrefixCodedTerms
I QueryTimeout
C QueryTimeoutImpl
C ReaderManager
C ReaderUtil
C SegmentCommitInfo
C SegmentInfo
C SegmentInfos
C SegmentOrder
C SegmentReadState
C SegmentReader
C SegmentWriteState
C SerialMergeScheduler
C SimpleMergedSegmentWarmer
C SingleTermsEnum
C SlowCodecReaderWrapper
C SlowImpactsEnum
C SnapshotDeletionPolicy
C SoftDeletesDirectoryReaderWrapper
C SoftDeletesRetentionMergePolicy
C SortFieldProvider
C SortedDocValues
C SortedNumericDocValues
C SortedSetDocValues
C Sorter
C SortingCodecReader
C StandardDirectoryReader
C StoredFieldVisitor
C StoredFields
C Term
C TermState
C TermStates
C TermVectors
C Terms
C TermsEnum
C TieredMergePolicy
I TwoPhaseCommit
C TwoPhaseCommitTool
C UpgradeIndexMergePolicy
E VectorEncoding
E VectorSimilarityFunction
BaseTermsEnum — members 5+
M attributes() AttributeSource
M prepare_seek_exact(text) IOBooleanSupplier
M seek_exact(text) boolean
C seek_exact(term, state)
M term_state() TermState
from BytesRefIterator
F EMPTY BytesRefIterator
M next() BytesRef
from TermsEnum
F EMPTY TermsEnum
M doc_freq() int
M impacts(flags) ImpactsEnum
M ord() long
M postings(reuse) PostingsEnum
M postings(reuse, flags) PostingsEnum
M seek_ceil(text) SeekStatus
C seek_exact(ord)
M term() BytesRef
M total_term_freq() long

org.apache.lucene.index.BaseTermsEnum

class abstract extends TermsEnum 5 members

A base TermsEnum that adds default implementations for

  • #attributes()
  • #termState()
  • #seekExact(BytesRef)
  • #seekExact(BytesRef, TermState)
In some cases, the default implementation may be slow and consume huge memory, so subclass SHOULD have its own implementation if possible.

Instance Methods

attributes

AttributeSource attributes ( )
Java: attributes()

prepare_seek_exact

IOBooleanSupplier prepare_seek_exact ( BytesRef text )
Java: prepareSeekExact(org.apache.lucene.util.BytesRef text)

seek_exact

boolean seek_exact ( BytesRef text )
Java: seekExact(org.apache.lucene.util.BytesRef text)

seek_exact

seek_exact ( BytesRef term, TermState state )
Java: seekExact(org.apache.lucene.util.BytesRef term, org.apache.lucene.index.TermState state)

term_state

TermState term_state ( )
Java: termState()

Inherited

from BytesRefIterator

fieldtypenote
EMPTY BytesRefIterator Singleton BytesRefIterator that iterates over 0 BytesRefs.

next

BytesRef next ( )
Java: next()

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.

Returns: the next BytesRef in the iterator or null if the end of the iterator is reached.

Throws

IOException If there is a low-level I/O error.

from TermsEnum

fieldtypenote
EMPTY TermsEnum An empty TermsEnum for quickly returning an empty instance e.g. in org.apache.lucene.search.MultiTermQuery

Please note: This enum should be unmodifiable, but it is currently possible to add Attributes to it. This should not be a problem, as the enum is always empty and the existence of unused Attributes does not matter.

doc_freq

int doc_freq ( )
Java: docFreq()

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

impacts

ImpactsEnum impacts ( int flags )
Java: impacts(int flags)

Return a ImpactsEnum.

ord

long ord ( )
Java: ord()

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.

postings

PostingsEnum postings ( PostingsEnum reuse )
Java: postings(org.apache.lucene.index.PostingsEnum reuse)

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

NOTE: the returned iterator may return deleted documents, so deleted documents have to be checked on top of the PostingsEnum.

Use this method if you only require documents and frequencies, and do not need any proximity data. This method is equivalent to postings(reuse, PostingsEnum.FREQS)

nametypedescription
reuseorg.apache.lucene.index.PostingsEnumpass a prior PostingsEnum for possible reuse

postings

PostingsEnum postings ( PostingsEnum reuse, int flags )
Java: postings(org.apache.lucene.index.PostingsEnum reuse, int flags)

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.

NOTE: the returned iterator may return deleted documents, so deleted documents have to be checked on top of the PostingsEnum.

nametypedescription
reuseorg.apache.lucene.index.PostingsEnumpass a prior PostingsEnum for possible reuse
flagsintspecifies which optional per-document values you require; see PostingsEnum#FREQS

seek_ceil

TermsEnum.SeekStatus seek_ceil ( BytesRef text )
Java: seekCeil(org.apache.lucene.util.BytesRef text)

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.

seek_exact

seek_exact ( long ord )
Java: seekExact(long ord)

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.

term

BytesRef term ( )
Java: term()

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

total_term_freq

long total_term_freq ( )
Java: totalTermFreq()

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.

this work for additional information regarding copyright ownership.