public class STMergingBlockReader extends STBlockReader
TermsEnum
used when merging segments,
to enumerate the terms of an input segment and get all the fields TermState
s
of each term.
It only supports calls to next()
and no seek method.
TermsEnum.SeekStatus
fieldInfos
blockDecoder, blockFirstLineStart, blockHeader, blockHeaderReader, blockInput, blockLine, blockLineReader, blockReadBuffer, blockStartFP, dictionaryBrowser, dictionaryBrowserSupplier, fieldMetadata, forcedTerm, lineIndexInBlock, postingsReader, scratchBlockBytes, scratchBlockLine, scratchTermState, termState, termStateForced, termStateSerializer, termStatesReadBuffer
NULL_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
TermState s 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, readTermState
clearTermState, compareToMiddleAndJump, createBlockHeaderSerializer, createDeltaBaseTermStateSerializer, decodeBlockBytesIfNeeded, docFreq, getOrCreateDictionaryBrowser, impacts, initializeBlockReadLazily, initializeHeader, isCurrentTerm, newCorruptIndexException, ord, postings, ramBytesUsed, readHeader, readLineInBlock, seekInBlock, seekInBlock, term, termState, totalTermFreq
attributes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildResources
public STMergingBlockReader(IndexDictionary.BrowserSupplier dictionaryBrowserSupplier, IndexInput blockInput, PostingsReaderBase postingsReader, FieldMetadata fieldMetadata, BlockDecoder blockDecoder, FieldInfos fieldInfos) throws IOException
IOException
public TermsEnum.SeekStatus seekCeil(BytesRef searchedTerm)
seekCeil
in class STBlockReader
public boolean seekExact(BytesRef searchedTerm)
seekExact
in class STBlockReader
public void seekExact(BytesRef term, TermState state)
BlockReader
BlockReader
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 BlockReader
public void seekExact(long ord)
BlockReader
seekExact
in class BlockReader
protected BlockTermState readTermStateIfNotRead()
BlockReader
BlockTermState
if it is not already set.
Sets BlockReader.termState
.readTermStateIfNotRead
in class BlockReader
public BytesRef next() throws IOException
next
in interface BytesRefIterator
next
in class STBlockReader
IOException
public 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.IOException
public void readFieldTermStatesMap(Map<String,BlockTermState> fieldTermStatesMap) throws IOException
TermState
s of the current term and put them
in the provided map. Clears the map first, before putting TermState
s.IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.