public class STBlockReader extends BlockReader
STBlockWriter
TermsEnum.SeekStatus
Modifier and Type | Field and Description |
---|---|
protected FieldInfos |
fieldInfos |
blockDecoder, blockFirstLineStart, blockHeader, blockInput, blockLine, blockLineReader, blockReadBuffer, blockStartFP, dictionaryBrowser, dictionaryBrowserSupplier, fieldMetadata, forcedTerm, lineIndexInBlock, postingsReader, scratchBlockBytes, scratchTermState, termState, termStateForced, termStateSerializer, termStatesReadBuffer
Constructor and Description |
---|
STBlockReader(Supplier<IndexDictionary.Browser> dictionaryBrowserSupplier,
IndexInput blockInput,
PostingsReaderBase postingsReader,
FieldMetadata fieldMetadata,
BlockDecoder blockDecoder,
FieldInfos fieldInfos) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isBeyondLastTerm(BytesRef searchedTerm,
long blockStartFP)
Indicates whether the searched term is beyond the last term of the field.
|
BytesRef |
next()
Increments the iteration to the next
BytesRef in the iterator. |
protected BytesRef |
nextTerm()
Moves to the next term line and reads it, whichever are the corresponding fields.
|
protected BlockTermState |
readTermState()
Reads the
BlockTermState on the current line for this reader's field. |
TermsEnum.SeekStatus |
seekCeil(BytesRef searchedTerm)
Seeks to the specified term, if it exists, or to the
next (ceiling) term.
|
boolean |
seekExact(BytesRef searchedTerm)
Attempts to seek to the exact term, returning true if the term is found.
|
clearTermState, compareToMiddleAndJump, decodeBlockBytesIfNeeded, docFreq, getOrCreateDictionaryBrowser, impacts, initializeBlockReadLazily, initializeHeader, isCurrentTerm, ord, postings, ramBytesUsed, readHeader, readLineInBlock, readTermStateIfNotRead, seekExact, seekExact, seekInBlock, seekInBlock, term, termState, totalTermFreq
attributes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildResources
protected final FieldInfos fieldInfos
public STBlockReader(Supplier<IndexDictionary.Browser> dictionaryBrowserSupplier, IndexInput blockInput, PostingsReaderBase postingsReader, FieldMetadata fieldMetadata, BlockDecoder blockDecoder, FieldInfos fieldInfos) throws IOException
IOException
public BytesRef next() throws IOException
BytesRefIterator
BytesRef
in the iterator.
Returns the resulting BytesRef
or null
if 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.next
in interface BytesRefIterator
next
in class BlockReader
BytesRef
in the iterator or null
if
the end of the iterator is reached.IOException
- If there is a low-level I/O error.protected BytesRef nextTerm() throws IOException
BlockReader.readTermStateIfNotRead()
.nextTerm
in class BlockReader
IOException
public TermsEnum.SeekStatus seekCeil(BytesRef searchedTerm) throws IOException
TermsEnum
seekCeil
in class BlockReader
IOException
public boolean seekExact(BytesRef searchedTerm) throws IOException
TermsEnum
TermsEnum.seekCeil(org.apache.lucene.util.BytesRef)
.
seekExact
in class BlockReader
IOException
protected boolean isBeyondLastTerm(BytesRef searchedTerm, long blockStartFP)
BlockReader
isBeyondLastTerm
in class BlockReader
blockStartFP
- The current block start file pointer.protected BlockTermState readTermState() throws IOException
BlockTermState
on the current line for this reader's field.readTermState
in class BlockReader
BlockTermState
; or null if the term does not occur for the field.IOException
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.