protected class NodBlockIndexOutput.NodBlockWriter extends BlockIndexOutput.BlockWriter
BlockWriter for the .nod file.
Encode and write blocks containing the node labels and term frequencies.
TODO: Can we try to reduce the number of test conditions for buffer size by using term frequency information ? At each new document, nodBlockWriter is informed of the term frequency, and check buffer size appropriately.
| Constructor and Description |
|---|
NodBlockIndexOutput.NodBlockWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
compress()
Compress the data block
|
protected void |
initBlock()
Init writer for new block
|
boolean |
isEmpty() |
boolean |
isFull() |
protected void |
resetCurrentNode() |
void |
write(org.apache.lucene.util.IntsRef node)
Add a node label to the buffer.
|
protected void |
writeData()
Write compressed data block to the output file
|
protected void |
writeHeader()
Write block header to the output file
|
void |
writeTermFreq(int termFreq)
Add the term frequency within the current node to the buffer
|
flush, getMinimumBufferSize, writeBlockpublic void write(org.apache.lucene.util.IntsRef node)
public void writeTermFreq(int termFreq)
public boolean isEmpty()
isEmpty in class BlockIndexOutput.BlockWriterpublic boolean isFull()
isFull in class BlockIndexOutput.BlockWriterprotected void writeHeader()
throws IOException
BlockIndexOutput.BlockWriterwriteHeader in class BlockIndexOutput.BlockWriterIOExceptionprotected void compress()
BlockIndexOutput.BlockWritercompress in class BlockIndexOutput.BlockWriterprotected void writeData()
throws IOException
BlockIndexOutput.BlockWriterwriteData in class BlockIndexOutput.BlockWriterIOExceptionprotected void initBlock()
BlockIndexOutput.BlockWriterinitBlock in class BlockIndexOutput.BlockWriterprotected void resetCurrentNode()
Copyright © 2014. All rights reserved.