Class STBlockReader
- java.lang.Object
-
- org.apache.lucene.index.TermsEnum
-
- org.apache.lucene.index.BaseTermsEnum
-
- org.apache.lucene.codecs.uniformsplit.BlockReader
-
- org.apache.lucene.codecs.uniformsplit.sharedterms.STBlockReader
-
- All Implemented Interfaces:
Accountable,BytesRefIterator
- Direct Known Subclasses:
STMergingBlockReader
public class STBlockReader extends BlockReader
Reads terms blocks with the Shared Terms format.- See Also:
STBlockWriter- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum
TermsEnum.SeekStatus
-
-
Field Summary
Fields Modifier and Type Field Description protected FieldInfosfieldInfos-
Fields inherited from class org.apache.lucene.codecs.uniformsplit.BlockReader
blockDecoder, blockFirstLineStart, blockHeader, blockHeaderReader, blockInput, blockLine, blockLineReader, blockReadBuffer, blockStartFP, dictionaryBrowser, dictionaryBrowserSupplier, fieldMetadata, forcedTerm, lineIndexInBlock, postingsReader, scratchBlockBytes, scratchBlockLine, scratchTermState, termState, termStateForced, termStateSerializer, termStatesReadBuffer
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description STBlockReader(IndexDictionary.BrowserSupplier dictionaryBrowserSupplier, IndexInput blockInput, PostingsReaderBase postingsReader, FieldMetadata fieldMetadata, BlockDecoder blockDecoder, FieldInfos fieldInfos)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected STBlockLine.SerializercreateBlockLineSerializer()protected booleanisBeyondLastTerm(BytesRef searchedTerm, long blockStartFP)Indicates whether the searched term is beyond the last term of the field.BytesRefnext()protected BytesRefnextTerm()Moves to the next term line and reads it, whichever are the corresponding fields.protected BlockTermStatereadTermState()Reads theBlockTermStateon the current line for this reader's field.TermsEnum.SeekStatusseekCeil(BytesRef searchedTerm)booleanseekExact(BytesRef searchedTerm)-
Methods inherited from class org.apache.lucene.codecs.uniformsplit.BlockReader
clearTermState, compareToMiddleAndJump, createBlockHeaderSerializer, createDeltaBaseTermStateSerializer, decodeBlockBytesIfNeeded, docFreq, getOrCreateDictionaryBrowser, impacts, initializeBlockReadLazily, initializeHeader, isCurrentTerm, newCorruptIndexException, ord, postings, ramBytesUsed, readHeader, readLineInBlock, readTermStateIfNotRead, seekExact, seekExact, seekInBlock, seekInBlock, term, termState, totalTermFreq
-
Methods inherited from class org.apache.lucene.index.BaseTermsEnum
attributes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Field Detail
-
fieldInfos
protected final FieldInfos fieldInfos
-
-
Constructor Detail
-
STBlockReader
public STBlockReader(IndexDictionary.BrowserSupplier dictionaryBrowserSupplier, IndexInput blockInput, PostingsReaderBase postingsReader, FieldMetadata fieldMetadata, BlockDecoder blockDecoder, FieldInfos fieldInfos) throws IOException
- Throws:
IOException
-
-
Method Detail
-
next
public BytesRef next() throws IOException
- Specified by:
nextin interfaceBytesRefIterator- Overrides:
nextin classBlockReader- Throws:
IOException
-
nextTerm
protected BytesRef nextTerm() throws IOException
Moves to the next term line and reads it, whichever are the corresponding fields. The term details are not read yet. They will be read only when needed withBlockReader.readTermStateIfNotRead().- Overrides:
nextTermin classBlockReader- Returns:
- The read term bytes.
- Throws:
IOException
-
seekCeil
public TermsEnum.SeekStatus seekCeil(BytesRef searchedTerm) throws IOException
- Overrides:
seekCeilin classBlockReader- Throws:
IOException
-
seekExact
public boolean seekExact(BytesRef searchedTerm) throws IOException
- Overrides:
seekExactin classBlockReader- Throws:
IOException
-
isBeyondLastTerm
protected boolean isBeyondLastTerm(BytesRef searchedTerm, long blockStartFP)
Description copied from class:BlockReaderIndicates whether the searched term is beyond the last term of the field.- Overrides:
isBeyondLastTermin classBlockReaderblockStartFP- The current block start file pointer.
-
createBlockLineSerializer
protected STBlockLine.Serializer createBlockLineSerializer()
- Overrides:
createBlockLineSerializerin classBlockReader
-
readTermState
protected BlockTermState readTermState() throws IOException
Reads theBlockTermStateon the current line for this reader's field.- Overrides:
readTermStatein classBlockReader- Returns:
- The
BlockTermState; or null if the term does not occur for the field. - Throws:
IOException
-
-