com.sun.labs.minion.retrieval
Class Passage

java.lang.Object
  extended by com.sun.labs.minion.retrieval.QueryElement
      extended by com.sun.labs.minion.retrieval.Operator
          extended by com.sun.labs.minion.retrieval.Proximity
              extended by com.sun.labs.minion.retrieval.Passage
All Implemented Interfaces:
java.lang.Comparable

public class Passage
extends Proximity

A class implementing the <passage> operator.


Field Summary
 
Fields inherited from class com.sun.labs.minion.retrieval.Proximity
gapPenalty, logTag, maxMissing, maxWindow, minWindow, ocTerms, oooPenalty, orderedOps, storePassages, terms
 
Fields inherited from class com.sun.labs.minion.retrieval.Operator
operands
 
Fields inherited from class com.sun.labs.minion.retrieval.QueryElement
estSize, fieldMultipliers, inOrder, keepPositions, order, part, qc, qs, searchFieldNames, searchFields, strictEval, wc, wf
 
Constructor Summary
Passage(java.util.List operands)
          Creates a passage operator for the given operands.
 
Method Summary
protected  int calculateEstimatedSize()
          Estimates the size of the results set.
 ArrayGroup eval(ArrayGroup ag)
          Evaluates this passage operator, returning the results.
 ArrayGroup eval(int doc)
          Evaluates this passage operator for a particular document, returning the passages found in that particular document.
 
Methods inherited from class com.sun.labs.minion.retrieval.Proximity
arrayCopy, calcPenalty, checkPositions, evalTerms, printCols, setGap, setOOO, setStorePassages, setWindow
 
Methods inherited from class com.sun.labs.minion.retrieval.Operator
addSearchFieldName, getOperands, getQueryTerms, setOperands, setPartition, setQueryConfig, setWeightingComponents, setWeightingFunction, toString, toString, toStringMod
 
Methods inherited from class com.sun.labs.minion.retrieval.QueryElement
compareTo, dump, estimateSize, getInOrder, getOrder, getQueryStats, getQueryTerms, getSearchFieldNames, setInOrder, setOrder, setQueryStats, setSearchFields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Passage

public Passage(java.util.List operands)
Creates a passage operator for the given operands.

Method Detail

calculateEstimatedSize

protected int calculateEstimatedSize()
Estimates the size of the results set. This is the minimum of the sum of the sizes of the terms and the minimum size of any operators that are operands, since these will be anded with the set.

Specified by:
calculateEstimatedSize in class QueryElement
Returns:
The estimated size of the results set for this element. This is meant to be an as-tight-as-possible estimate of the results set size. It is acceptable to overestimate, but not to underestimate the size of the result set.

eval

public ArrayGroup eval(ArrayGroup ag)
Evaluates this passage operator, returning the results.

Overrides:
eval in class QueryElement

eval

public ArrayGroup eval(int doc)
Evaluates this passage operator for a particular document, returning the passages found in that particular document. This eval method is meant to be used when building passages for display after retrieval. It assumes that all of the operands given to the constructor are terms.