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
Fields Modifier and Type Field Description (package private) booleandecoded(package private) BytesRefFSTEnum<FSTTermOutputs.TermData>fstEnum(package private) booleanseekPending(package private) BytesRefterm-
Fields inherited from class org.apache.lucene.codecs.memory.FSTTermsReader.TermsReader.BaseTermsEnum
bytesReader, meta, state
-
-
Constructor Summary
Constructors Constructor Description SegmentTermsEnum()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voiddecodeMetaData()Decodes metadata into customized term stateBytesRefnext()Increments the iteration to the nextBytesRefin the iterator.TermsEnum.SeekStatusseekCeil(BytesRef target)Seeks to the specified term, if it exists, or to the next (ceiling) term.booleanseekExact(BytesRef target)Attempts to seek to the exact term, returning true if the term is found.voidseekExact(BytesRef target, TermState otherState)Expert: Seeks a specific position byTermStatepreviously obtained fromTermsEnum.termState().BytesRefterm()Returns current term.(package private) voidupdateEnum(BytesRefFSTEnum.InputOutput<FSTTermOutputs.TermData> pair)-
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 Detail
-
term
BytesRef term
-
fstEnum
final BytesRefFSTEnum<FSTTermOutputs.TermData> fstEnum
-
decoded
boolean decoded
-
seekPending
boolean seekPending
-
-
Method Detail
-
term
public BytesRef term() throws java.io.IOException
Description copied from class:TermsEnumReturns current term. Do not call this when the enum is unpositioned.
-
decodeMetaData
void decodeMetaData() throws java.io.IOExceptionDescription copied from class:FSTTermsReader.TermsReader.BaseTermsEnumDecodes metadata into customized term state- Specified by:
decodeMetaDatain classFSTTermsReader.TermsReader.BaseTermsEnum- Throws:
java.io.IOException
-
updateEnum
void updateEnum(BytesRefFSTEnum.InputOutput<FSTTermOutputs.TermData> pair)
-
next
public BytesRef next() throws java.io.IOException
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:
java.io.IOException- If there is a low-level I/O error.
-
seekExact
public boolean seekExact(BytesRef target) throws java.io.IOException
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:
java.io.IOException
-
seekCeil
public TermsEnum.SeekStatus seekCeil(BytesRef target) throws java.io.IOException
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.
-
seekExact
public void seekExact(BytesRef target, TermState otherState)
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
-
-