com.sun.labs.minion.retrieval
Class ScoredQuickOr

java.lang.Object
  extended by com.sun.labs.minion.retrieval.QuickOr
      extended by com.sun.labs.minion.retrieval.ScoredQuickOr

public class ScoredQuickOr
extends QuickOr

A class that will allow us to quickly or together a number of terms. The class will attempt to optimize for a number of conditions, including the case where the resulting document set can be stored in a single array.


Field Summary
protected static java.lang.String logTag
           
 
Fields inherited from class com.sun.labs.minion.retrieval.QuickOr
added, docs, p, part
 
Constructor Summary
ScoredQuickOr(DiskPartition part, int estSize)
          Creates a quick or for a given partition.
 
Method Summary
 void add(int[] d, float[] w, float qw)
          Adds an explicit set of documents and weights to this quick or.
 void add(PostingsIterator pi)
          Adds the contents of a postings iterator to this quick or.
 void add(PostingsIterator pi, float qw)
           
 void add(PostingsIterator pi, float dw, float qw)
           
 void addWeightOnly(float qw)
          Adds only a weight to this QuickOr.
 ArrayGroup getGroup()
           
 void setField(int fieldID)
           
 
Methods inherited from class com.sun.labs.minion.retrieval.QuickOr
setQueryStats, shouldStoreAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logTag

protected static java.lang.String logTag
Constructor Detail

ScoredQuickOr

public ScoredQuickOr(DiskPartition part,
                     int estSize)
Creates a quick or for a given partition. The estimated size of the result set is used for our initial calculation.

Method Detail

setField

public void setField(int fieldID)

add

public void add(PostingsIterator pi)
Adds the contents of a postings iterator to this quick or.

Overrides:
add in class QuickOr
Parameters:
pi - the iterator for the postings.

add

public void add(PostingsIterator pi,
                float qw)
Overrides:
add in class QuickOr

add

public void add(PostingsIterator pi,
                float dw,
                float qw)

add

public void add(int[] d,
                float[] w,
                float qw)
Adds an explicit set of documents and weights to this quick or.

Overrides:
add in class QuickOr
Parameters:
d - the documents to add
w - the weights associated with the documents
qw - a weight associated with a query term, which will be multiplied against the weights in the array.

addWeightOnly

public void addWeightOnly(float qw)
Adds only a weight to this QuickOr. This allows for document representations where not all terms from a document appear in the partition that this QuickOr corresponds to. We still want those terms' weights to be accounted for.

Overrides:
addWeightOnly in class QuickOr
Parameters:
qw - the query weight of a term to add to this QuickOr

getGroup

public ArrayGroup getGroup()
Overrides:
getGroup in class QuickOr