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, writeBlock
public void write(org.apache.lucene.util.IntsRef node)
public void writeTermFreq(int termFreq)
public boolean isEmpty()
isEmpty
in class BlockIndexOutput.BlockWriter
public boolean isFull()
isFull
in class BlockIndexOutput.BlockWriter
protected void writeHeader() throws IOException
BlockIndexOutput.BlockWriter
writeHeader
in class BlockIndexOutput.BlockWriter
IOException
protected void compress()
BlockIndexOutput.BlockWriter
compress
in class BlockIndexOutput.BlockWriter
protected void writeData() throws IOException
BlockIndexOutput.BlockWriter
writeData
in class BlockIndexOutput.BlockWriter
IOException
protected void initBlock()
BlockIndexOutput.BlockWriter
initBlock
in class BlockIndexOutput.BlockWriter
protected void resetCurrentNode()
Copyright © 2014. All rights reserved.