public class BlockFieldIntegerCodingIterablePosting extends FieldIntegerCodingIterablePosting 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 |
protected int |
maxBlocks |
asFieldDocumentIndex, fields, fieldsCodec, fieldsCount, fieldsMatrix
blkCnt, chunkSize, currentPosting, decompressed, documentIndex, id, ids, idsCodec, input, logger, numberOfEntries, tf, tfs, tfsCodec
EOL
Constructor and Description |
---|
BlockFieldIntegerCodingIterablePosting(ByteIn input,
int numberOfEntries,
DocumentIndex documentIndex,
int chunkSize,
int fieldCount,
int hasBlocks,
int maxBlocks,
IntegerCodec idsCodec,
IntegerCodec tfsCodec,
IntegerCodec fieldsCodec,
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
|
getFieldFrequencies, getFieldLengths, setFieldLengths
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
protected final int maxBlocks
public BlockFieldIntegerCodingIterablePosting(ByteIn input, int numberOfEntries, DocumentIndex documentIndex, int chunkSize, int fieldCount, int hasBlocks, int maxBlocks, IntegerCodec idsCodec, IntegerCodec tfsCodec, IntegerCodec fieldsCodec, IntegerCodec blocksCodec) throws IOException
input
- the input channelnumberOfEntries
- the number of postingsdocumentIndex
- the document indexchunkSize
- the size of the chunkfieldCount
- the number of fields (0 if the posting list has no fields)hasBlocks
- 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 frequenciesfieldsCodec
- the IntegerCodec to use to decode field frequencies (if any, null otherwise)blocksCodec
- the IntegerCodec to use to decode blocks (if any, null otherwise)IOException
public WritablePosting asWritablePosting()
Posting
asWritablePosting
in interface Posting
asWritablePosting
in class FieldIntegerCodingIterablePosting
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 FieldIntegerCodingIterablePosting
IOException
protected final void skip() throws IOException
skip
in class FieldIntegerCodingIterablePosting
IOException
protected final void get(int pos) throws IOException
get
in class FieldIntegerCodingIterablePosting
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 FieldIntegerCodingIterablePosting
public long getCurrentAddress()
getCurrentAddress
in class BasicIntegerCodingIterablePosting
Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow