public class IntegerCodingPostingOutputStream extends AbstractPostingOutputStream
Modifier and Type | Field and Description |
---|---|
protected int[] |
ids |
protected static org.apache.log4j.Logger |
logger
The logger used
|
protected ByteOut |
output |
Constructor and Description |
---|
IntegerCodingPostingOutputStream(ByteOut output,
int chunkSize,
int fieldsCount,
int hasBlocks,
IntegerCodec idsCodec,
IntegerCodec tfsCodec,
IntegerCodec fieldsCodec,
IntegerCodec blocksCodec) |
IntegerCodingPostingOutputStream(String filename,
int chunkSize,
int fieldsCount,
int hasBlocks,
IntegerCodec idsCodec,
IntegerCodec tfsCodec,
IntegerCodec fieldsCodec,
IntegerCodec blocksCodec) |
Modifier and Type | Method and Description |
---|---|
void |
close()
close this object.
|
BitFilePosition |
getOffset()
What is current offset?
|
Class<? extends IterablePosting> |
getPostingIteratorClass()
Returns the IterablePosting class to use for reading structure written by
this class
|
protected void |
write(int i,
int cnt)
compress and write down the current chunk of postings
|
BitIndexPointer |
writePostings(int[][] postings,
int startOffset,
int Length,
int firstId) |
BitIndexPointer |
writePostings(IterablePosting postings)
Write out the specified postings.
|
BitIndexPointer |
writePostings(IterablePosting postings,
int previousId) |
BitIndexPointer |
writePostings(Iterator<Posting> iterator) |
BitIndexPointer |
writePostings(Iterator<Posting> iterator,
int previousId) |
protected static final org.apache.log4j.Logger logger
protected ByteOut output
protected int[] ids
public IntegerCodingPostingOutputStream(String filename, int chunkSize, int fieldsCount, int hasBlocks, IntegerCodec idsCodec, IntegerCodec tfsCodec, IntegerCodec fieldsCodec, IntegerCodec blocksCodec) throws IOException
filename
- the file where to writechunkSize
- the chunk size (in term of number of posting)fieldsCount
- the number of fields, if any. 0 otherwisehasBlocks
- 0:no blocks, 1:positions, 2:blocks of any size!=1idsCodec
- the IntegerCodec to use to compress idstfsCodec
- the IntegerCodec to use to compress tfsfieldsCodec
- the IntegerCodec to use to compress fields (null if there are no fields)blocksCodec
- the IntegerCodec to use to compress blocks (null if there are no blocks)IOException
public IntegerCodingPostingOutputStream(ByteOut output, int chunkSize, int fieldsCount, int hasBlocks, IntegerCodec idsCodec, IntegerCodec tfsCodec, IntegerCodec fieldsCodec, IntegerCodec blocksCodec) throws IOException
output
- the output channelchunkSize
- the chunk size (in term of number of posting)fieldsCount
- the number of fields, if any. 0 otherwisehasBlocks
- 0:no blocks, 1:positions, 2:blocks of any size!=1idsCodec
- the IntegerCodec to use to compress idstfsCodec
- the IntegerCodec to use to compress tfsfieldsCodec
- the IntegerCodec to use to compress fields (null if there are no fields)blocksCodec
- the IntegerCodec to use to compress blocks (null if there are no blocks)IOException
public Class<? extends IterablePosting> getPostingIteratorClass()
getPostingIteratorClass
in class AbstractPostingOutputStream
public BitIndexPointer writePostings(IterablePosting postings) throws IOException
writePostings
in class AbstractPostingOutputStream
postings
- IterablePosting postings accessed through an IterablePosting
objectIOException
protected void write(int i, int cnt) throws IOException
i
- number of postingscnt
- number of blocksIOException
public void close()
close
in class AbstractPostingOutputStream
public BitFilePosition getOffset()
getOffset
in class AbstractPostingOutputStream
public BitIndexPointer writePostings(int[][] postings, int startOffset, int Length, int firstId) throws IOException
writePostings
in class AbstractPostingOutputStream
IOException
public BitIndexPointer writePostings(IterablePosting postings, int previousId) throws IOException
writePostings
in class AbstractPostingOutputStream
IOException
public BitIndexPointer writePostings(Iterator<Posting> iterator, int previousId) throws IOException
writePostings
in class AbstractPostingOutputStream
IOException
public BitIndexPointer writePostings(Iterator<Posting> iterator) throws IOException
writePostings
in class AbstractPostingOutputStream
IOException
Terrier 4.0. Copyright © 2004-2014 University of Glasgow