com.sun.labs.minion.retrieval.cache
Class TermCacheElement
java.lang.Object
com.sun.labs.minion.retrieval.cache.TermCacheElement
- Direct Known Subclasses:
- FieldedTermCacheElement
public class TermCacheElement
- extends java.lang.Object
An element in a term cache. Stores the weighted postings for a single
term in a single partition.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
terms
protected java.util.List<java.lang.String> terms
part
protected DiskPartition part
feat
protected PostingsIteratorFeatures feat
ids
protected int[] ids
counts
protected int[] counts
weights
protected float[] weights
n
protected int n
ts
protected TermStatsImpl ts
TermCacheElement
protected TermCacheElement(java.util.List<java.lang.String> terms,
PostingsIteratorFeatures feat,
DiskPartition part)
- Creates a cache element.
- Parameters:
terms
- the terms to cache in this element.feat
- the features that we'll use when adding terms to this cache element.part
- the partition from which the term has been selected.
preAdd
protected PostingsIterator preAdd(QueryEntry e)
getTermStats
public TermStatsImpl getTermStats()
add
protected void add(QueryEntry e)
- Adds a dictionary entry to this cache element.
- Parameters:
e
- the entry to add.
merge
protected void merge(PostingsIterator pi)
getName
public java.lang.String getName()
computeWeights
protected void computeWeights()
- Computes the weights for the documents in this group, given a
weighting function and set of weighting components.
getGroup
public ScoredGroup getGroup()
iterator
public PostingsIterator iterator()