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) BytesRefFields inherited from class org.apache.lucene.codecs.memory.FSTTermsReader.TermsReader.BaseTermsEnum
bytesReader, meta, state -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidDecodes metadata into customized term statenext()Increments the iteration to the nextBytesRefin the iterator.Seeks to the specified term, if it exists, or to the next (ceiling) term.booleanAttempts to seek to the exact term, returning true if the term is found.voidExpert: Seeks a specific position byTermStatepreviously obtained fromTermsEnum.termState().term()Returns current term.(package private) voidMethods inherited from class org.apache.lucene.codecs.memory.FSTTermsReader.TermsReader.BaseTermsEnum
docFreq, impacts, ord, postings, seekExact, termState, totalTermFreqMethods 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:TermsEnumReturns current term. Do not call this when the enum is unpositioned.- Specified by:
termin classTermsEnum- Throws:
IOException
-
decodeMetaData
Description copied from class:FSTTermsReader.TermsReader.BaseTermsEnumDecodes metadata into customized term state- Specified by:
decodeMetaDatain classFSTTermsReader.TermsReader.BaseTermsEnum- Throws:
IOException
-
updateEnum
-
next
Description copied from interface:BytesRefIteratorIncrements the iteration to the nextBytesRefin the iterator. Returns the resultingBytesRefornullif 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
BytesRefin the iterator ornullif the end of the iterator is reached. - Throws:
IOException- If there is a low-level I/O error.
-
seekExact
Description copied from class:TermsEnumAttempts 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:
seekExactin classBaseTermsEnum- Returns:
- true if the term is found; return false if the enum is unpositioned.
- Throws:
IOException
-
seekCeil
Description copied from class:TermsEnumSeeks 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:
seekCeilin classTermsEnum- Throws:
IOException
-
seekExact
Description copied from class:TermsEnumExpert: Seeks a specific position byTermStatepreviously obtained fromTermsEnum.termState(). Callers should maintain theTermStateto use this method. Low-level implementations may position the TermsEnum without re-seeking the term dictionary.Seeking by
TermStateshould only be used iff the state was obtained from the sameTermsEnuminstance.NOTE: Using this method with an incompatible
TermStatemight leave thisTermsEnumin undefined state. On a segment levelTermStateinstances are compatible only iff the source and the targetTermsEnumoperate on the same field. If operating on segment level, TermState instances must not be used across segments.NOTE: A seek by
TermStatemight not restore theAttributeSource's state.AttributeSourcestates must be maintained separately if this method is used.- Overrides:
seekExactin classBaseTermsEnum- Parameters:
target- the term the TermState corresponds tootherState- theTermState
-