public abstract class PostingsWriterBase extends PostingsConsumer implements Closeable
PostingsConsumer to support pluggable term dictionaries.
This class contains additional hooks to interact with the provided
term dictionaries such as BlockTreeTermsWriter. If you want
to re-use an existing implementation and are only interested in
customizing the format of the postings list, extend this class
instead.
PostingsReaderBase| Modifier | Constructor and Description |
|---|---|
protected |
PostingsWriterBase()
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close() |
abstract void |
finishTerm(TermStats stats)
Finishes the current term.
|
abstract void |
flushTermsBlock(int start,
int count)
Flush count terms starting at start "backwards", as a
block.
|
abstract void |
setField(FieldInfo fieldInfo)
Called when the writing switches to another field.
|
abstract void |
start(IndexOutput termsOut)
Called once after startup, before any terms have been
added.
|
abstract void |
startTerm()
Start a new term.
|
addPosition, finishDoc, merge, startDocprotected PostingsWriterBase()
public abstract void start(IndexOutput termsOut) throws IOException
termsOut.IOExceptionpublic abstract void startTerm()
throws IOException
finishTerm(TermStats) is done, only if the term has at least one
document.IOExceptionpublic abstract void flushTermsBlock(int start,
int count)
throws IOException
IOExceptionpublic abstract void finishTerm(TermStats stats) throws IOException
TermStats contains the term's summary statistics.IOExceptionpublic abstract void setField(FieldInfo fieldInfo)
public abstract void close()
throws IOException
close in interface CloseableIOExceptionCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.