org.egothor.query.runner
Class ProxRunner

java.lang.Object
  extended by org.egothor.core.query.Runner
      extended by org.egothor.query.runner.ProxRunner
Direct Known Subclasses:
ProxRunner

public class ProxRunner
extends Runner

The ProxRunner 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
 TermRunner a
          Description of the Field
 TermRunner b
          Description of the Field
 int diff
          Description of the Field
 int[] prox_a
          Description of the Field
 int[] prox_b
          Description of the Field
 
Constructor Summary
ProxRunner(TermRunner a, TermRunner b, int diff)
          Constructor for the ProxRunner object
 
Method Summary
 int evaluate(long uid)
          Return the similarity of this object to the document with the given unique ID.
 java.lang.String invalidReason()
          Return an explanation as to why this search is invalid.
 int terms()
          Description of the Method
 
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
 

Field Detail

a

public TermRunner a
Description of the Field


b

public TermRunner b
Description of the Field


diff

public int diff
Description of the Field


prox_a

public int[] prox_a
Description of the Field


prox_b

public int[] prox_b
Description of the Field

Constructor Detail

ProxRunner

public ProxRunner(TermRunner a,
                  TermRunner b,
                  int diff)
Constructor for the ProxRunner object

Parameters:
a - the Runner for the first term
b - the Runner for the second term
diff - Description of the Parameter
Method Detail

terms

public int terms()
Description of the Method

Specified by:
terms in class Runner
Returns:
Description of the Return Value

invalidReason

public java.lang.String invalidReason()
Return an explanation as to why this search is invalid.

Specified by:
invalidReason in class Runner
Returns:
a String containing an explanation

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.

Specified by:
evaluate in class Runner
Parameters:
uid - the document in question
Returns:
the similarity