public class BlockFieldDocumentPostingList extends FieldDocumentPostingList
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
|
field_occurrences, fieldCount, fieldLengths
AVG_DOCUMENT_UNIQUE_TERMS, documentLength, occurrences
Constructor and Description |
---|
BlockFieldDocumentPostingList(int NUM_FIELDS)
Constructs an instance of BlockFieldDocumentPostingList.
|
Modifier and Type | Method and Description |
---|---|
int[] |
getBlocks(String term)
Get the blocks for the specified term
|
int[][] |
getPostings()
returns the postings suitable to be written into the block direct index
|
void |
insert(int tf,
String t,
int[] fieldIds,
int blockId)
Insert a term into this document tf times, occurs at given block id, and in the given fields
|
void |
insert(String t,
int[] fieldIds,
int blockId)
Insert a term into this document, occurs at given block id, and in the given fields
|
void |
insert(String t,
int fieldId,
int blockId)
Insert a term into this document, occurs at given block id, and in the given field
|
protected IterablePosting |
makePostingIterator(String[] _terms,
int[] termIds) |
void |
readFields(DataInput in) |
void |
write(DataOutput out) |
clear, getDocumentStatistics, getFieldFrequencies, insert, insert, insert, insert
forEachTerm, getDocumentLength, getFrequency, getNumberOfPointers, getPostings2, getTermId, insert, insert, termSet
protected final gnu.trove.THashMap<String,gnu.trove.TIntHashSet> term_blocks
protected int blockCount
public BlockFieldDocumentPostingList(int NUM_FIELDS)
NUM_FIELDS
- public int[] getBlocks(String term)
public void insert(String t, int fieldId, int blockId)
public void insert(String t, int[] fieldIds, int blockId)
public void insert(int tf, String t, int[] fieldIds, int blockId)
public int[][] getPostings()
getPostings
in class FieldDocumentPostingList
protected IterablePosting makePostingIterator(String[] _terms, int[] termIds)
makePostingIterator
in class FieldDocumentPostingList
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class FieldDocumentPostingList
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class FieldDocumentPostingList
IOException
Terrier 4.0. Copyright © 2004-2014 University of Glasgow