|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.unimi.di.mg4j.index.AbstractBitStreamIndexWriter
public abstract class AbstractBitStreamIndexWriter
An abstract bitstream-based index writer, providing common variables and a basic printStats(PrintStream)
implementation.
Implementing subclasses need to know the compression method that they should use
to write frequencies, pointers, payloads, counts and positions (and whether to write any of them).
This information is passed to the constructor
using a suitable flag map (see CompressionFlags
).
Field Summary | |
---|---|
long |
bitsForCounts
The number of bits written for counts. |
long |
bitsForFrequencies
The number of bits written for frequencies. |
long |
bitsForPayloads
The number of bits written for payloads. |
long |
bitsForPointers
The number of bits written for document pointers. |
long |
bitsForPositions
The number of bits written for positions. |
protected CompressionFlags.Coding |
countCoding
The coding for counts. |
protected int |
currentTerm
The current term. |
Map<CompressionFlags.Component,CompressionFlags.Coding> |
flags
The flag map. |
protected CompressionFlags.Coding |
frequencyCoding
The coding for frequencies. |
protected boolean |
hasCounts
Whether this index contains counts. |
protected boolean |
hasPayloads
Whether this index contains payloads. |
protected boolean |
hasPositions
Whether this index contains positions. |
protected int |
numberOfDocuments
The number of documents of the collection to be indexed. |
protected long |
numberOfOccurrences
The number of indexed occurrences. |
protected long |
numberOfPostings
The number of indexed postings (pairs term/document). |
protected CompressionFlags.Coding |
pointerCoding
The coding for pointers. |
protected CompressionFlags.Coding |
positionCoding
The coding for positions. |
Constructor Summary | |
---|---|
AbstractBitStreamIndexWriter(int numberOfDocuments,
Map<CompressionFlags.Component,CompressionFlags.Coding> flags)
|
Method Summary | |
---|---|
void |
printStats(PrintStream stats)
Writes to the given print stream statistical information about the index just built. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface it.unimi.di.mg4j.index.IndexWriter |
---|
close, newDocumentRecord, newInvertedList, properties, writeDocumentPointer, writeDocumentPositions, writeFrequency, writePayload, writePositionCount, writtenBits |
Field Detail |
---|
protected final int numberOfDocuments
public Map<CompressionFlags.Component,CompressionFlags.Coding> flags
protected CompressionFlags.Coding frequencyCoding
protected CompressionFlags.Coding pointerCoding
protected CompressionFlags.Coding countCoding
protected CompressionFlags.Coding positionCoding
protected final boolean hasPayloads
protected final boolean hasCounts
protected final boolean hasPositions
protected long numberOfPostings
protected long numberOfOccurrences
protected int currentTerm
public long bitsForFrequencies
public long bitsForPointers
public long bitsForCounts
public long bitsForPayloads
public long bitsForPositions
Constructor Detail |
---|
public AbstractBitStreamIndexWriter(int numberOfDocuments, Map<CompressionFlags.Component,CompressionFlags.Coding> flags)
Method Detail |
---|
public void printStats(PrintStream stats)
IndexWriter
IndexWriter.close()
.
printStats
in interface IndexWriter
stats
- a print stream where statistical information will be written.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |