org.egothor.query.runner.enhanced
Class TermRunner

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

public class TermRunner
extends TermRunner

The TermRunner object represents a binary form of a query that consists of one term.

Author:
Leo Galambos

Constructor Summary
TermRunner(int model, double idf, Rider r, java.lang.String field, Token token, int boost, boolean req, boolean proh)
          Constructor for the TermRunner object
TermRunner(int model, IListWasher washer, double idf, Rider r, java.lang.String field, Token token, int boost, boolean req, boolean proh)
          Constructor for the TermRunner object.
 
Method Summary
 int evaluate(long uid)
          Return the calculated similarity.
 
Methods inherited from class org.egothor.query.runner.TermRunner
getProx, 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

TermRunner

public TermRunner(int model,
                  IListWasher washer,
                  double idf,
                  Rider r,
                  java.lang.String field,
                  Token token,
                  int boost,
                  boolean req,
                  boolean proh)
Constructor for the TermRunner object. This object is constructed for a rider r, and a term that is in the given field , its token type is name , and its text is text .

Parameters:
model - Description of the Parameter
washer - Description of the Parameter
idf - the inverse document frequency
r - the Rider used by this Runner
field - Description of the Parameter
token - the token describing the search term
boost - Description of the Parameter
req - Description of the Parameter
proh - Description of the Parameter

TermRunner

public TermRunner(int model,
                  double idf,
                  Rider r,
                  java.lang.String field,
                  Token token,
                  int boost,
                  boolean req,
                  boolean proh)
Constructor for the TermRunner object

Parameters:
model - Description of the Parameter
idf - Description of the Parameter
r - Description of the Parameter
field - Description of the Parameter
token - Description of the Parameter
boost - Description of the Parameter
req - Description of the Parameter
proh - Description of the Parameter
Method Detail

evaluate

public int evaluate(long uid)
Return the calculated similarity. When the current document is not uid , then it returns 0. Otherwise is calculates the similarity as 1+w*idf . More details can be found in the Runner class entry.

Overrides:
evaluate in class TermRunner
Parameters:
uid - the unique ID of the document
Returns:
the similarity