com.sun.labs.minion.retrieval
Class ScoredQuickOr
java.lang.Object
com.sun.labs.minion.retrieval.QuickOr
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
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logTag
protected static java.lang.String logTag
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.
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 addw
- the weights associated with the documentsqw
- 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