org.egothor.query.runner.enhanced
Class NotRunner

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

public class NotRunner
extends NotRunner

This object represents a binary form of a NOT b formula. This Runner is used when the user wished to exclude a term from documents returned as hits. For example, the user might wish to find documents where the search terms BASS but NOT GUITAR are used. The form of this query would be given as:

BASS -GUITAR.

Author:
Leo Galambos

Field Summary
 
Fields inherited from class org.egothor.query.runner.NotRunner
a, b
 
Constructor Summary
NotRunner(int model, Runner a, Runner b)
          Constructor for the NotRunner object.
 
Method Summary
 int evaluate(long uid)
          Return the calculated similarity.
 
Methods inherited from class org.egothor.query.runner.NotRunner
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

NotRunner

public NotRunner(int model,
                 Runner a,
                 Runner b)
Constructor for the NotRunner object.

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

evaluate

public int evaluate(long uid)
Return the calculated similarity. Returns 0 when the first argument of formula is not positive or the second one is positive.

Overrides:
evaluate in class NotRunner
Parameters:
uid - the document searched
Returns:
the similarity