public abstract class PostingsReaderBase extends Object implements Closeable
DocsEnum
and
DocsAndPositionsEnum
instances. It provides an
IndexInput (termsIn) where this class may read any
previously stored data that it had written in its
corresponding PostingsWriterBase
at indexing
time.Modifier | Constructor and Description |
---|---|
protected |
PostingsReaderBase()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
close() |
abstract DocsEnum |
docs(FieldInfo fieldInfo,
BlockTermState state,
Bits skipDocs,
DocsEnum reuse,
int flags)
Must fully consume state, since after this call that
TermState may be reused.
|
abstract DocsAndPositionsEnum |
docsAndPositions(FieldInfo fieldInfo,
BlockTermState state,
Bits skipDocs,
DocsAndPositionsEnum reuse,
int flags)
Must fully consume state, since after this call that
TermState may be reused.
|
abstract void |
init(IndexInput termsIn)
Performs any initialization, such as reading and
verifying the header from the provided terms
dictionary
IndexInput . |
abstract BlockTermState |
newTermState()
Return a newly created empty TermState
|
abstract void |
nextTerm(FieldInfo fieldInfo,
BlockTermState state)
Actually decode metadata for next term
|
abstract long |
ramBytesUsed()
Returns approximate RAM bytes used
|
abstract void |
readTermsBlock(IndexInput termsIn,
FieldInfo fieldInfo,
BlockTermState termState)
Reads data for all terms in the next block; this
method should merely load the byte[] blob but not
decode, which is done in
nextTerm(org.apache.lucene.index.FieldInfo, org.apache.lucene.codecs.BlockTermState) . |
protected PostingsReaderBase()
public abstract void init(IndexInput termsIn) throws IOException
IndexInput
.IOException
public abstract BlockTermState newTermState() throws IOException
IOException
public abstract void nextTerm(FieldInfo fieldInfo, BlockTermState state) throws IOException
IOException
public abstract DocsEnum docs(FieldInfo fieldInfo, BlockTermState state, Bits skipDocs, DocsEnum reuse, int flags) throws IOException
IOException
public abstract DocsAndPositionsEnum docsAndPositions(FieldInfo fieldInfo, BlockTermState state, Bits skipDocs, DocsAndPositionsEnum reuse, int flags) throws IOException
IOException
public abstract long ramBytesUsed()
public abstract void close() throws IOException
close
in interface Closeable
IOException
public abstract void readTermsBlock(IndexInput termsIn, FieldInfo fieldInfo, BlockTermState termState) throws IOException
nextTerm(org.apache.lucene.index.FieldInfo, org.apache.lucene.codecs.BlockTermState)
.IOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.