org.modeshape.search.lucene.query
Class ScoreQuery

java.lang.Object
  extended by org.apache.lucene.search.Query
      extended by org.modeshape.search.lucene.query.ScoreQuery
All Implemented Interfaces:
Serializable, Cloneable

public class ScoreQuery
extends org.apache.lucene.search.Query

A Lucene Query implementation that is used to apply a FullTextSearchScore criteria 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 ScoreQuery.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 ScoreQuery.NotWeight
          Calculates query weights and builds query scores for our NOT queries.
 
Field Summary
protected  org.apache.lucene.search.Query operand
          The operand that is being negated by this query.
 
Constructor Summary
ScoreQuery(org.apache.lucene.search.Query operand)
          Construct a NOT(x) constraint where the 'x' operand is supplied.
 
Method Summary
 Object clone()
          
 org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.Searcher searcher)
          
 String toString(String field)
          
 
Methods inherited from class org.apache.lucene.search.Query
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

operand

protected final org.apache.lucene.search.Query operand
The operand that is being negated by this query.

Constructor Detail

ScoreQuery

public ScoreQuery(org.apache.lucene.search.Query operand)
Construct a NOT(x) constraint where the 'x' operand is supplied.

Parameters:
operand - the operand being negated
Method Detail

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.