public class BlockIntegerCodingIterablePosting extends BasicIntegerCodingIterablePosting implements BlockPosting
Modifier and Type | Field and Description |
---|---|
protected int |
bf |
protected int[] |
bfs |
protected int[] |
blocks |
protected IntegerCodec |
blocksCodec |
protected int[] |
blocksMatrix |
protected int |
hasBlocks |
blkCnt, chunkSize, currentPosting, decompressed, documentIndex, id, ids, idsCodec, input, logger, numberOfEntries, tf, tfs, tfsCodec
EOL
Constructor and Description |
---|
BlockIntegerCodingIterablePosting(ByteIn input,
int numberOfEntries,
DocumentIndex documentIndex,
int chunkSize,
int hasBlocks,
IntegerCodec idsCodec,
IntegerCodec tfsCodec,
IntegerCodec blocksCodec) |
Modifier and Type | Method and Description |
---|---|
WritablePosting |
asWritablePosting()
Copies this posting to one free of an iterator.
|
void |
close() |
protected void |
decompress()
This load the a chunk (tfs, fields and blocks (optionally)) and decompress it
|
protected void |
get(int pos)
Read the posting components from the chunk
|
long |
getCurrentAddress() |
int[] |
getPositions()
Return positions of occurrences
|
protected void |
skip()
If tfs, fields frequencies and blocks are not required, skip that
part of the chunk
|
String |
toString()
Makes a human readable form of this posting
|
endOfPostings, getDocumentLength, getFrequency, getId, load, next, next, setId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDocumentLength, getFrequency, getId, setId
protected int bf
protected int[] blocks
protected int[] bfs
protected int[] blocksMatrix
protected final IntegerCodec blocksCodec
protected final int hasBlocks
public BlockIntegerCodingIterablePosting(ByteIn input, int numberOfEntries, DocumentIndex documentIndex, int chunkSize, int hasBlocks, IntegerCodec idsCodec, IntegerCodec tfsCodec, IntegerCodec blocksCodec) throws IOException
input
- the input channelnumberOfEntries
- the number of postingsdocumentIndex
- the document indexchunkSize
- the size of the chunkhasBlocks
- has this posting list posting positions? (0: no, 1:has positions, >1:has blocks)idsCodec
- the IntegerCodec to use to decode docIdstfsCodec
- the IntegerCodec to use to decode term frequenciesblocksCodec
- the IntegerCodec to use to decode blocks (if any, null otherwise)IOException
public WritablePosting asWritablePosting()
Posting
asWritablePosting
in interface Posting
asWritablePosting
in class BasicIntegerCodingIterablePosting
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class BasicIntegerCodingIterablePosting
IOException
protected final void decompress() throws IOException
decompress
in class BasicIntegerCodingIterablePosting
IOException
protected final void skip() throws IOException
skip
in class BasicIntegerCodingIterablePosting
IOException
protected final void get(int pos) throws IOException
get
in class BasicIntegerCodingIterablePosting
pos
- the posting to load (as index in the internal arrays)IOException
public int[] getPositions()
BlockPosting
getPositions
in interface BlockPosting
public String toString()
toString
in class BasicIntegerCodingIterablePosting
public long getCurrentAddress()
getCurrentAddress
in class BasicIntegerCodingIterablePosting
Terrier 4.0. Copyright © 2004-2014 University of Glasgow