org.egothor.query.runner.enhanced
Class PhraseRunner

java.lang.Object
  extended by org.egothor.core.query.Runner
      extended by org.egothor.query.runner.PhraseRunner
          extended by org.egothor.query.runner.enhanced.PhraseRunner

public class PhraseRunner
extends PhraseRunner

The PhraseRunner class is used when a user wishes to make a query involving two terms where the 2nd term must lie within n words of the 1st . For example, a user might wish to view documents where BASS lies within 2 words of GUITAR. This query would be given in the form:

(BASS 2 GUITAR) (the parentheses are required).

Author:
Leo Galambos

Field Summary
 
Fields inherited from class org.egothor.query.runner.PhraseRunner
scanner, set
 
Constructor Summary
PhraseRunner(int model, TermRunner[] a)
          Constructor for the PhraseRunner object
 
Method Summary
 int evaluate(long uid)
          Return the similarity of this object to the document with the given unique ID.
 
Methods inherited from class org.egothor.query.runner.PhraseRunner
invalidReason, terms
 
Methods inherited from class org.egothor.core.query.Runner
run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhraseRunner

public PhraseRunner(int model,
                    TermRunner[] a)
Constructor for the PhraseRunner object

Parameters:
model - Description of the Parameter
a - the Runner array
Method Detail

evaluate

public int evaluate(long uid)
Return the similarity of this object to the document with the given unique ID. When any of formula variables returns non-positive value, then the evaluation is 0.

Overrides:
evaluate in class PhraseRunner
Parameters:
uid - the document in question
Returns:
the similarity