Class NotQuery

  extended by
      extended by
All Implemented Interfaces:
Serializable, Cloneable

public class NotQuery

A Lucene Query implementation that is used to represent a NOT expression of another wrapped Query object. This query implementation works by using the weight and scorer of the wrapped query to score (and return) only those documents that were not scored by the wrapped query. In other words, if the wrapped query ended up scoring any document, that document is not scored (i.e., skipped) by this query.

See Also:
Serialized Form

Nested Class Summary
protected static class NotQuery.NotScorer
          A scorer for the NOT query that iterates over documents (in increasing docId order), using the given scorer implementation for the operand of the NOT.
protected  class NotQuery.NotWeight
          Calculates query weights and builds query scores for our NOT queries.
Field Summary
protected operand
          The operand that is being negated by this query.
Constructor Summary
NotQuery( operand)
          Construct a NOT(x) constraint where the 'x' operand is supplied.
Method Summary
 Object clone()
   createWeight( searcher)
 String toString(String field)
Methods inherited from class
combine, equals, extractTerms, getBoost, getSimilarity, hashCode, mergeBooleanQueries, rewrite, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail


protected final operand
The operand that is being negated by this query.

Constructor Detail


public NotQuery( operand)
Construct a NOT(x) constraint where the 'x' operand is supplied.

operand - the operand being negated
Method Detail


public createWeight( searcher)

createWeight in class
See Also:


public Object clone()

clone in class
See Also:


public String toString(String field)

Specified by:
toString in class
See Also:

Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.