public class BlockDocumentPostingList extends DocumentPostingList
Properties:
DocumentPostingList
DocumentPostingList.postingIterator
Modifier and Type | Field and Description |
---|---|
protected int |
blockCount
number of blocks in this document.
|
protected gnu.trove.THashMap<String,gnu.trove.TIntHashSet> |
term_blocks
mapping term to blockids in this document
|
AVG_DOCUMENT_UNIQUE_TERMS, documentLength, occurrences
Constructor and Description |
---|
BlockDocumentPostingList()
Instantiate a new block document posting list.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all postings from this document
|
int[] |
getBlocks(String term)
return blocks
|
int[][] |
getPostings()
returns the postings suitable to be written into the block direct index
|
void |
insert(String t,
int blockId)
Insert a term into this document, occurs at given block id
|
protected IterablePosting |
makePostingIterator(String[] _terms,
int[] termIds) |
void |
readFields(DataInput in) |
void |
write(DataOutput out) |
forEachTerm, getDocumentLength, getDocumentStatistics, getFrequency, getNumberOfPointers, getPostings2, getTermId, insert, insert, termSet
protected final gnu.trove.THashMap<String,gnu.trove.TIntHashSet> term_blocks
protected int blockCount
public BlockDocumentPostingList()
public void insert(String t, int blockId)
public int[] getBlocks(String term)
term
- public int[][] getPostings()
getPostings
in class DocumentPostingList
protected IterablePosting makePostingIterator(String[] _terms, int[] termIds)
makePostingIterator
in class DocumentPostingList
public void clear()
DocumentPostingList
clear
in class DocumentPostingList
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class DocumentPostingList
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class DocumentPostingList
IOException
Terrier 4.0. Copyright © 2004-2014 University of Glasgow