public class STMergingBlockReader extends STBlockReader
org.apache.lucene.index.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.
fieldInfosblockDecoder, blockFirstLineStart, blockHeader, blockInput, blockLine, blockLineReader, blockReadBuffer, blockStartFP, dictionaryBrowser, dictionaryBrowserSupplier, fieldMetadata, forcedTerm, lineIndexInBlock, postingsReader, scratchBlockBytes, scratchTermState, termState, termStateForced, termStateSerializer, termStatesReadBuffer| Constructor and Description |
|---|
STMergingBlockReader(java.util.function.Supplier<IndexDictionary.Browser> dictionaryBrowserSupplier,
IndexInput blockInput,
PostingsReaderBase postingsReader,
FieldMetadata fieldMetadata,
BlockDecoder blockDecoder,
FieldInfos fieldInfos) |
| Modifier and Type | Method and Description |
|---|---|
BytesRef |
next() |
PostingsEnum |
postings(java.lang.String fieldName,
BlockTermState termState,
PostingsEnum reuse,
int flags)
Creates a new
PostingsEnum for the provided field and BlockTermState. |
void |
readFieldTermStatesMap(java.util.Map<java.lang.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. |
SeekStatus |
seekCeil(BytesRef searchedTerm) |
boolean |
seekExact(BytesRef searchedTerm) |
void |
seekExact(BytesRef term,
TermState state)
Positions this
BlockReader without re-seeking the term dictionary. |
isBeyondLastTerm, nextTerm, readTermStateclearTermState, compareToMiddleAndJump, decodeBlockBytesIfNeeded, docFreq, getOrCreateDictionaryBrowser, impacts, initializeBlockReadLazily, initializeHeader, isCurrentTerm, ord, postings, ramBytesUsed, readHeader, readLineInBlock, seekInBlock, seekInBlock, term, termState, totalTermFreqpublic STMergingBlockReader(java.util.function.Supplier<IndexDictionary.Browser> dictionaryBrowserSupplier, IndexInput blockInput, PostingsReaderBase postingsReader, FieldMetadata fieldMetadata, BlockDecoder blockDecoder, FieldInfos fieldInfos) throws java.io.IOException
java.io.IOExceptionpublic 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(PostingsEnum, int) after this method does require the block to be read.
seekExact in class BlockReaderprotected BlockTermState readTermStateIfNotRead()
BlockReaderBlockTermState if it is not already set.
Sets BlockReader.termState.readTermStateIfNotRead in class BlockReaderpublic BytesRef next()
throws java.io.IOException
next in class STBlockReaderjava.io.IOExceptionpublic PostingsEnum postings(java.lang.String fieldName,
BlockTermState termState,
PostingsEnum reuse,
int flags)
throws java.io.IOException
PostingsEnum for the provided field and BlockTermState.reuse - Previous PostingsEnum to reuse; or null to create a new one.flags - Postings flags.java.io.IOExceptionpublic void readFieldTermStatesMap(java.util.Map<java.lang.String,BlockTermState> fieldTermStatesMap)
throws java.io.IOException
TermStates of the current term and put them
in the provided map. Clears the map first, before putting TermStates.java.io.IOExceptionData In Motion GmbH all rights reserved