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(java.util.function.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.
|
(package private) TermsEnum.SeekStatus |
seekCeilIgnoreField(BytesRef searchedTerm) |
boolean |
seekExact(BytesRef searchedTerm)
Attempts to seek to the exact term, returning true if the term is found.
|
private boolean |
termOccursInField() |
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(java.util.function.Supplier<IndexDictionary.Browser> dictionaryBrowserSupplier, IndexInput blockInput, PostingsReaderBase postingsReader, FieldMetadata fieldMetadata, BlockDecoder blockDecoder, FieldInfos fieldInfos) throws java.io.IOException
java.io.IOException
public BytesRef next() throws java.io.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.java.io.IOException
- If there is a low-level I/O error.private boolean termOccursInField() throws java.io.IOException
java.io.IOException
protected BytesRef nextTerm() throws java.io.IOException
BlockReader.readTermStateIfNotRead()
.nextTerm
in class BlockReader
java.io.IOException
public TermsEnum.SeekStatus seekCeil(BytesRef searchedTerm) throws java.io.IOException
TermsEnum
seekCeil
in class BlockReader
java.io.IOException
TermsEnum.SeekStatus seekCeilIgnoreField(BytesRef searchedTerm) throws java.io.IOException
java.io.IOException
public boolean seekExact(BytesRef searchedTerm) throws java.io.IOException
TermsEnum
TermsEnum.seekCeil(org.apache.lucene.util.BytesRef)
.
seekExact
in class BlockReader
java.io.IOException
protected boolean isBeyondLastTerm(BytesRef searchedTerm, long blockStartFP)
BlockReader
isBeyondLastTerm
in class BlockReader
blockStartFP
- The current block start file pointer.protected BlockTermState readTermState() throws java.io.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.java.io.IOException