public class IntegerCodingPostingIndex extends Object implements PostingIndex<BitIndexPointer>
PostingIndex
provides access to an index of
BasicIntegerCodingIterablePosting
(or one of it subclasses).
This expects in the data.properties file some information, such as
index.structureName.fields.count=the number of fields in the postings, if any
index.structureName.blocks=0 (no blocks) or 1 (positions) or >1 (blocks of any size)
index.structureName.blocks.max=0 (no limit) or >1 (position information limited) -- default is ApplicationSetup.MAX_BLOCKS
index.structureName.compression.integer.chunk-size=the maximum number of posting in a chunk
index.structureName.compression.integer.ids.codec=the IntegerCodec
implementation to use for docIds
index.structureName.compression.integer.tfs.codec=the IntegerCodec
implementation to use for tfs
index.structureName.compression.integer.fields.codec=the IntegerCodec
implementation to use for fields (optional)
index.structureName.compression.integer.blocks.codec=the IntegerCodec
implementation to use for blocks (optional)PostingIndex.DocidSpecificDocumentIndex
Modifier and Type | Field and Description |
---|---|
protected IntegerCodec |
blocksCodec |
protected int |
chunkSize |
protected DocumentIndex |
documentIndex |
protected IntegerCodec |
fieldsCodec |
protected int |
fieldsCount |
protected ByteInSeekable[] |
file |
protected int |
hasBlocks |
protected IntegerCodec |
idsCodec |
protected IndexOnDisk |
index |
protected int |
maxBlocks |
protected IntegerCodec |
tfsCodec |
Constructor and Description |
---|
IntegerCodingPostingIndex(IndexOnDisk index,
String structureName) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
IterablePosting |
getPostings(Pointer _pointer)
Get the posting given a pointer
|
protected void |
openFile(String structureName) |
protected IndexOnDisk index
protected ByteInSeekable[] file
protected DocumentIndex documentIndex
protected int fieldsCount
protected int hasBlocks
protected int maxBlocks
protected int chunkSize
protected IntegerCodec idsCodec
protected IntegerCodec tfsCodec
protected IntegerCodec fieldsCodec
protected IntegerCodec blocksCodec
public IntegerCodingPostingIndex(IndexOnDisk index, String structureName) throws IOException
IOException
protected void openFile(String structureName) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public IterablePosting getPostings(Pointer _pointer) throws IOException
PostingIndex
getPostings
in interface PostingIndex<BitIndexPointer>
IOException
Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow