org.modeshape.search.lucene.query
Class CompareQuery.CompareWeight

java.lang.Object
  extended by org.apache.lucene.search.Weight
      extended by org.modeshape.search.lucene.query.CompareQuery.CompareWeight
All Implemented Interfaces:
Serializable
Enclosing class:
CompareQuery<ValueType>

protected class CompareQuery.CompareWeight
extends org.apache.lucene.search.Weight

Calculates query weights and builds query scores for our NOT queries.

See Also:
Serialized Form

Constructor Summary
protected CompareQuery.CompareWeight()
           
 
Method Summary
 org.apache.lucene.search.Explanation explain(org.apache.lucene.index.IndexReader reader, int doc)
          
 org.apache.lucene.search.Query getQuery()
          
 float getValue()
           This implementation always returns a weight factor of 1.0.
 void normalize(float norm)
           This implementation always does nothing, as there is nothing to normalize.
 org.apache.lucene.search.Scorer scorer(org.apache.lucene.index.IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)
          
 float sumOfSquaredWeights()
           This implementation always returns a normalization factor of 1.0.
 
Methods inherited from class org.apache.lucene.search.Weight
scoresDocsOutOfOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompareQuery.CompareWeight

protected CompareQuery.CompareWeight()
Method Detail

getQuery

public org.apache.lucene.search.Query getQuery()

Specified by:
getQuery in class org.apache.lucene.search.Weight
See Also:
Weight.getQuery()

getValue

public float getValue()

This implementation always returns a weight factor of 1.0.

Specified by:
getValue in class org.apache.lucene.search.Weight
See Also:
Weight.getValue()

sumOfSquaredWeights

public float sumOfSquaredWeights()

This implementation always returns a normalization factor of 1.0.

Specified by:
sumOfSquaredWeights in class org.apache.lucene.search.Weight
See Also:
Weight.sumOfSquaredWeights()

normalize

public void normalize(float norm)

This implementation always does nothing, as there is nothing to normalize.

Specified by:
normalize in class org.apache.lucene.search.Weight
See Also:
Weight.normalize(float)

scorer

public org.apache.lucene.search.Scorer scorer(org.apache.lucene.index.IndexReader reader,
                                              boolean scoreDocsInOrder,
                                              boolean topScorer)

Specified by:
scorer in class org.apache.lucene.search.Weight
See Also:
Weight.scorer(org.apache.lucene.index.IndexReader, boolean, boolean)

explain

public org.apache.lucene.search.Explanation explain(org.apache.lucene.index.IndexReader reader,
                                                    int doc)

Specified by:
explain in class org.apache.lucene.search.Weight
See Also:
Weight.explain(org.apache.lucene.index.IndexReader, int)


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