public class STMergingBlockReader extends STBlockReader
TermsEnum used when merging segments,
to enumerate the terms of an input segment and get all the fields TermStates
of each term.
It only supports calls to next() and no seek method.
TermsEnum.SeekStatusfieldInfosblockDecoder, blockFirstLineStart, blockHeader, blockHeaderReader, blockInput, blockLine, blockLineReader, blockReadBuffer, blockStartFP, dictionaryBrowser, dictionaryBrowserSupplier, fieldMetadata, forcedTerm, lineIndexInBlock, postingsReader, scratchBlockBytes, scratchBlockLine, scratchTermState, termState, termStateForced, termStateSerializer, termStatesReadBufferNULL_ACCOUNTABLE| Constructor and Description |
|---|
STMergingBlockReader(IndexDictionary.BrowserSupplier dictionaryBrowserSupplier,
IndexInput blockInput,
PostingsReaderBase postingsReader,
FieldMetadata fieldMetadata,
BlockDecoder blockDecoder,
FieldInfos fieldInfos) |
| Modifier and Type | Method and Description |
|---|---|
BytesRef |
next() |
PostingsEnum |
postings(String fieldName,
BlockTermState termState,
PostingsEnum reuse,
int flags)
Creates a new
PostingsEnum for the provided field and BlockTermState. |
void |
readFieldTermStatesMap(Map<String,BlockTermState> fieldTermStatesMap)
Reads all the fields
TermStates of the current term and put them
in the provided map. |
protected BlockTermState |
readTermStateIfNotRead()
Reads the
BlockTermState if it is not already set. |
TermsEnum.SeekStatus |
seekCeil(BytesRef searchedTerm) |
boolean |
seekExact(BytesRef searchedTerm) |
void |
seekExact(BytesRef term,
TermState state)
Positions this
BlockReader without re-seeking the term dictionary. |
void |
seekExact(long ord)
Not supported.
|
createBlockLineSerializer, isBeyondLastTerm, nextTerm, readTermStateclearTermState, compareToMiddleAndJump, createBlockHeaderSerializer, createDeltaBaseTermStateSerializer, decodeBlockBytesIfNeeded, docFreq, getOrCreateDictionaryBrowser, impacts, initializeBlockReadLazily, initializeHeader, isCurrentTerm, newCorruptIndexException, ord, postings, ramBytesUsed, readHeader, readLineInBlock, seekInBlock, seekInBlock, term, termState, totalTermFreqattributesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildResourcespublic STMergingBlockReader(IndexDictionary.BrowserSupplier dictionaryBrowserSupplier, IndexInput blockInput, PostingsReaderBase postingsReader, FieldMetadata fieldMetadata, BlockDecoder blockDecoder, FieldInfos fieldInfos) throws IOException
IOExceptionpublic TermsEnum.SeekStatus seekCeil(BytesRef searchedTerm)
seekCeil in class STBlockReaderpublic boolean seekExact(BytesRef searchedTerm)
seekExact in class STBlockReaderpublic void seekExact(BytesRef term, TermState state)
BlockReaderBlockReader without 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.
Calling BlockReader.postings(org.apache.lucene.index.PostingsEnum, int) after this method does require the block to be read.
seekExact in class BlockReaderpublic void seekExact(long ord)
BlockReaderseekExact in class BlockReaderprotected BlockTermState readTermStateIfNotRead()
BlockReaderBlockTermState if it is not already set.
Sets BlockReader.termState.readTermStateIfNotRead in class BlockReaderpublic BytesRef next() throws IOException
next in interface BytesRefIteratornext in class STBlockReaderIOExceptionpublic PostingsEnum postings(String fieldName, BlockTermState termState, PostingsEnum reuse, int flags) throws IOException
PostingsEnum for the provided field and BlockTermState.reuse - Previous PostingsEnum to reuse; or null to create a new one.flags - Postings flags.IOExceptionpublic void readFieldTermStatesMap(Map<String,BlockTermState> fieldTermStatesMap) throws IOException
TermStates of the current term and put them
in the provided map. Clears the map first, before putting TermStates.IOExceptionCopyright © 2000-2024 Apache Software Foundation. All Rights Reserved.