Module org.apache.lucene.codecs
Package org.apache.lucene.codecs.memory
Class FSTTermsReader.TermsReader.SegmentTermsEnum
java.lang.Object
org.apache.lucene.index.TermsEnum
org.apache.lucene.index.BaseTermsEnum
org.apache.lucene.codecs.memory.FSTTermsReader.TermsReader.BaseTermsEnum
org.apache.lucene.codecs.memory.FSTTermsReader.TermsReader.SegmentTermsEnum
- All Implemented Interfaces:
BytesRefIterator
- Enclosing class:
FSTTermsReader.TermsReader
private final class FSTTermsReader.TermsReader.SegmentTermsEnum
extends FSTTermsReader.TermsReader.BaseTermsEnum
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum
TermsEnum.SeekStatus
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
(package private) final BytesRefFSTEnum
<FSTTermOutputs.TermData> (package private) boolean
(package private) BytesRef
Fields inherited from class org.apache.lucene.codecs.memory.FSTTermsReader.TermsReader.BaseTermsEnum
bytesReader, meta, state
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
Decodes metadata into customized term statenext()
Increments the iteration to the nextBytesRef
in the iterator.Seeks to the specified term, if it exists, or to the next (ceiling) term.boolean
Attempts to seek to the exact term, returning true if the term is found.void
Expert: Seeks a specific position byTermState
previously obtained fromTermsEnum.termState()
.term()
Returns current term.(package private) void
Methods inherited from class org.apache.lucene.codecs.memory.FSTTermsReader.TermsReader.BaseTermsEnum
docFreq, impacts, ord, postings, seekExact, termState, totalTermFreq
Methods inherited from class org.apache.lucene.index.BaseTermsEnum
attributes
-
Field Details
-
term
BytesRef term -
fstEnum
-
decoded
boolean decoded -
seekPending
boolean seekPending
-
-
Constructor Details
-
SegmentTermsEnum
SegmentTermsEnum() throws IOException- Throws:
IOException
-
-
Method Details
-
term
Description copied from class:TermsEnum
Returns current term. Do not call this when the enum is unpositioned.- Specified by:
term
in classTermsEnum
- Throws:
IOException
-
decodeMetaData
Description copied from class:FSTTermsReader.TermsReader.BaseTermsEnum
Decodes metadata into customized term state- Specified by:
decodeMetaData
in classFSTTermsReader.TermsReader.BaseTermsEnum
- Throws:
IOException
-
updateEnum
-
next
Description copied from interface:BytesRefIterator
Increments the iteration to the nextBytesRef
in the iterator. Returns the resultingBytesRef
ornull
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 ornull
if the end of the iterator is reached. - Throws:
IOException
- If there is a low-level I/O error.
-
seekExact
Description copied from class:TermsEnum
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 thanTermsEnum.seekCeil(org.apache.lucene.util.BytesRef)
.- Overrides:
seekExact
in classBaseTermsEnum
- Returns:
- true if the term is found; return false if the enum is unpositioned.
- Throws:
IOException
-
seekCeil
Description copied from class:TermsEnum
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.- Specified by:
seekCeil
in classTermsEnum
- Throws:
IOException
-
seekExact
Description copied from class:TermsEnum
Expert: Seeks a specific position byTermState
previously obtained fromTermsEnum.termState()
. Callers should maintain theTermState
to use this method. Low-level implementations may position the TermsEnum without re-seeking the term dictionary.Seeking by
TermState
should only be used iff the state was obtained from the sameTermsEnum
instance.NOTE: Using this method with an incompatible
TermState
might leave thisTermsEnum
in undefined state. On a segment levelTermState
instances are compatible only iff the source and the targetTermsEnum
operate on the same field. If operating on segment level, TermState instances must not be used across segments.NOTE: A seek by
TermState
might not restore theAttributeSource
's state.AttributeSource
states must be maintained separately if this method is used.- Overrides:
seekExact
in classBaseTermsEnum
- Parameters:
target
- the term the TermState corresponds tootherState
- theTermState
-