com.sun.labs.minion.retrieval.cache
Class TermCacheElement

java.lang.Object
  extended by 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.


Nested Class Summary
 class TermCacheElement.TCEIterator
          An iterator for this element of the term cache.
 
Field Summary
protected  int[] counts
           
protected  PostingsIteratorFeatures feat
           
protected  int[] ids
           
protected  int n
           
protected  DiskPartition part
           
protected  java.util.List<java.lang.String> terms
           
protected  TermStatsImpl ts
           
protected  float[] weights
           
 
Constructor Summary
protected TermCacheElement(java.util.List<java.lang.String> terms, PostingsIteratorFeatures feat, DiskPartition part)
          Creates a cache element.
 
Method Summary
protected  void add(QueryEntry e)
          Adds a dictionary entry to this cache element.
protected  void computeWeights()
          Computes the weights for the documents in this group, given a weighting function and set of weighting components.
 ScoredGroup getGroup()
           
 java.lang.String getName()
           
 TermStatsImpl getTermStats()
           
 PostingsIterator iterator()
           
protected  void merge(PostingsIterator pi)
           
protected  PostingsIterator preAdd(QueryEntry e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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.
Method Detail

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()