org.jboss.dna.search.lucene.query
Class NotQuery
java.lang.Object
org.apache.lucene.search.Query
org.jboss.dna.search.lucene.query.NotQuery
- All Implemented Interfaces:
- Serializable, Cloneable
public class NotQuery
- extends org.apache.lucene.search.Query
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
Constructor Summary |
NotQuery(org.apache.lucene.search.Query operand)
Construct a NOT(x) constraint where the 'x' operand is supplied. |
Methods inherited from class org.apache.lucene.search.Query |
combine, equals, extractTerms, getBoost, getSimilarity, hashCode, mergeBooleanQueries, rewrite, setBoost, toString, weight |
NotQuery
public NotQuery(org.apache.lucene.search.Query operand)
- Construct a NOT(x) constraint where the 'x' operand is supplied.
- Parameters:
operand
- the operand being negated
createWeight
public org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.Searcher searcher)
-
- Overrides:
createWeight
in class org.apache.lucene.search.Query
- See Also:
Query.createWeight(org.apache.lucene.search.Searcher)
clone
public Object clone()
-
- Overrides:
clone
in class org.apache.lucene.search.Query
- See Also:
Query.clone()
toString
public String toString(String field)
-
- Specified by:
toString
in class org.apache.lucene.search.Query
- See Also:
Query.toString(java.lang.String)
Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.