Class STIntersectBlockReader
- java.lang.Object
-
- org.apache.lucene.index.TermsEnum
-
- org.apache.lucene.index.BaseTermsEnum
-
- org.apache.lucene.codecs.uniformsplit.BlockReader
-
- org.apache.lucene.codecs.uniformsplit.IntersectBlockReader
-
- org.apache.lucene.codecs.uniformsplit.sharedterms.STIntersectBlockReader
-
- All Implemented Interfaces:
Accountable
,BytesRefIterator
public class STIntersectBlockReader extends IntersectBlockReader
The "intersect"TermsEnum
response toSTUniformSplitTerms.intersect(CompiledAutomaton, BytesRef)
, intersecting the terms with an automaton.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.codecs.uniformsplit.IntersectBlockReader
IntersectBlockReader.AutomatonNextTermCalculator
-
Nested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum
TermsEnum.SeekStatus
-
-
Field Summary
Fields Modifier and Type Field Description protected FieldInfos
fieldInfos
-
Fields inherited from class org.apache.lucene.codecs.uniformsplit.IntersectBlockReader
beyondCommonPrefix, blockPrefixLen, blockPrefixRunAutomatonState, commonPrefixRef, commonSuffixRef, nextStringCalculator, numBytesAccepted, runAutomaton, seekTerm, startTerm
-
Fields inherited from class org.apache.lucene.codecs.uniformsplit.BlockReader
blockDecoder, blockFirstLineStart, blockHeader, blockInput, blockLine, blockLineReader, blockReadBuffer, blockStartFP, dictionaryBrowser, dictionaryBrowserSupplier, fieldMetadata, forcedTerm, lineIndexInBlock, postingsReader, scratchBlockBytes, scratchTermState, termState, termStateForced, termStateSerializer, termStatesReadBuffer
-
-
Constructor Summary
Constructors Constructor Description STIntersectBlockReader(CompiledAutomaton compiled, BytesRef startTerm, DictionaryBrowserSupplier dictionaryBrowserSupplier, IndexInput blockInput, PostingsReaderBase postingsReader, FieldMetadata fieldMetadata, BlockDecoder blockDecoder, FieldInfos fieldInfos)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BytesRef
next()
Increments the iteration to the nextBytesRef
in the iterator.protected boolean
nextBlockMatchingPrefix()
Find the next block that appears to contain terms that could match the automata.protected BlockTermState
readTermState()
Reads theBlockTermState
on the current line for the specific field corresponding this this reader.private boolean
termOccursInField()
-
Methods inherited from class org.apache.lucene.codecs.uniformsplit.IntersectBlockReader
isBeyondCommonPrefix, nextTermInBlockMatching, runAutomatonForState, runAutomatonFromPrefix, seekCeil, seekExact, seekExact, seekExact
-
Methods inherited from class org.apache.lucene.codecs.uniformsplit.BlockReader
clearTermState, compareToMiddleAndJump, decodeBlockBytesIfNeeded, docFreq, getOrCreateDictionaryBrowser, impacts, initializeBlockReadLazily, initializeHeader, isBeyondLastTerm, isCurrentTerm, nextTerm, ord, postings, ramBytesUsed, readHeader, readLineInBlock, readTermStateIfNotRead, seekInBlock, seekInBlock, term, termState, totalTermFreq
-
Methods inherited from class org.apache.lucene.index.BaseTermsEnum
attributes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Field Detail
-
fieldInfos
protected final FieldInfos fieldInfos
-
-
Constructor Detail
-
STIntersectBlockReader
public STIntersectBlockReader(CompiledAutomaton compiled, BytesRef startTerm, DictionaryBrowserSupplier dictionaryBrowserSupplier, IndexInput blockInput, PostingsReaderBase postingsReader, FieldMetadata fieldMetadata, BlockDecoder blockDecoder, FieldInfos fieldInfos) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
next
public BytesRef next() throws java.io.IOException
Description copied from interface:BytesRefIterator
Increments the iteration to the nextBytesRef
in the iterator. Returns the resultingBytesRef
ornull
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.- Specified by:
next
in interfaceBytesRefIterator
- Overrides:
next
in classIntersectBlockReader
- Returns:
- the next
BytesRef
in the iterator ornull
if the end of the iterator is reached. - Throws:
java.io.IOException
- If there is a low-level I/O error.
-
termOccursInField
private boolean termOccursInField() throws java.io.IOException
- Throws:
java.io.IOException
-
nextBlockMatchingPrefix
protected boolean nextBlockMatchingPrefix() throws java.io.IOException
Description copied from class:IntersectBlockReader
Find the next block that appears to contain terms that could match the automata. The prefix is the primary clue. Returns true if at one, or false for no more (EOF).- Overrides:
nextBlockMatchingPrefix
in classIntersectBlockReader
- Throws:
java.io.IOException
-
readTermState
protected BlockTermState readTermState() throws java.io.IOException
Reads theBlockTermState
on the current line for the specific field corresponding this this reader. Changes the currentBlockTermState
to null if the term does not occur for the field.- Overrides:
readTermState
in classBlockReader
- Returns:
- The
BlockTermState
; or null if none. - Throws:
java.io.IOException
-
-