Module org.apache.lucene.codecs
Class STMergingBlockReader
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
org.apache.lucene.codecs.uniformsplit.sharedterms.STMergingBlockReader
- All Implemented Interfaces:
Accountable,BytesRefIterator
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum
TermsEnum.SeekStatus -
Field Summary
Fields inherited from class org.apache.lucene.codecs.uniformsplit.sharedterms.STBlockReader
fieldInfosFields 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, termStatesReadBufferFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
ConstructorsConstructorDescriptionSTMergingBlockReader(IndexDictionary.BrowserSupplier dictionaryBrowserSupplier, IndexInput blockInput, PostingsReaderBase postingsReader, FieldMetadata fieldMetadata, BlockDecoder blockDecoder, FieldInfos fieldInfos) -
Method Summary
Modifier and TypeMethodDescriptionnext()Increments the iteration to the nextBytesRefin the iterator.postings(String fieldName, BlockTermState termState, PostingsEnum reuse, int flags) Creates a newPostingsEnumfor the provided field andBlockTermState.voidreadFieldTermStatesMap(Map<String, BlockTermState> fieldTermStatesMap) Reads all the fieldsTermStates of the current term and put them in the provided map.protected BlockTermStateReads theBlockTermStateif it is not already set.Seeks to the specified term, if it exists, or to the next (ceiling) term.voidseekExact(long ord) Not supported.booleanAttempts to seek to the exact term, returning true if the term is found.voidPositions thisBlockReaderwithout re-seeking the term dictionary.Methods inherited from class org.apache.lucene.codecs.uniformsplit.sharedterms.STBlockReader
createBlockLineSerializer, isBeyondLastTerm, nextTerm, readTermState, seekCeilIgnoreFieldMethods 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, seekInBlock, seekInBlock, term, termState, totalTermFreqMethods inherited from class org.apache.lucene.index.BaseTermsEnum
attributesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Constructor Details
-
STMergingBlockReader
public STMergingBlockReader(IndexDictionary.BrowserSupplier dictionaryBrowserSupplier, IndexInput blockInput, PostingsReaderBase postingsReader, FieldMetadata fieldMetadata, BlockDecoder blockDecoder, FieldInfos fieldInfos) throws IOException - Throws:
IOException
-
-
Method Details
-
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.- Overrides:
seekCeilin classSTBlockReader
-
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 classSTBlockReader- Returns:
- true if the term is found; return false if the enum is unpositioned.
-
seekExact
Description copied from class:BlockReaderPositions thisBlockReaderwithout re-seeking the term dictionary.The block containing the term is not read by this method. It will be read lazily only if needed, for example if
BlockReader.next()is called. CallingBlockReader.postings(org.apache.lucene.index.PostingsEnum, int)after this method does require the block to be read.- Overrides:
seekExactin classBlockReader- Parameters:
term- the term the TermState corresponds tostate- theTermState
-
seekExact
public void seekExact(long ord) Description copied from class:BlockReaderNot supported.- Overrides:
seekExactin classBlockReader
-
readTermStateIfNotRead
Description copied from class:BlockReaderReads theBlockTermStateif it is not already set. SetsBlockReader.termState.- Overrides:
readTermStateIfNotReadin classBlockReader
-
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.- Specified by:
nextin interfaceBytesRefIterator- Overrides:
nextin classSTBlockReader- 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.
-
postings
public PostingsEnum postings(String fieldName, BlockTermState termState, PostingsEnum reuse, int flags) throws IOException Creates a newPostingsEnumfor the provided field andBlockTermState.- Parameters:
reuse- PreviousPostingsEnumto reuse; or null to create a new one.flags- Postings flags.- Throws:
IOException
-
readFieldTermStatesMap
public void readFieldTermStatesMap(Map<String, BlockTermState> fieldTermStatesMap) throws IOExceptionReads all the fieldsTermStates of the current term and put them in the provided map. Clears the map first, before puttingTermStates.- Throws:
IOException
-