org.apache.jackrabbit.core.query.lucene
Class JackrabbitTermQuery.JackrabbitTermWeight

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.JackrabbitTermQuery.JackrabbitTermWeight
All Implemented Interfaces:
Serializable, org.apache.lucene.search.Weight
Enclosing class:
JackrabbitTermQuery

protected class JackrabbitTermQuery.JackrabbitTermWeight
extends Object

The weight implementation.

See Also:
Serialized Form

Field Summary
protected  org.apache.lucene.search.Searcher searcher
          The searcher for this weight.
 
Constructor Summary
JackrabbitTermQuery.JackrabbitTermWeight(org.apache.lucene.search.Searcher searcher, org.apache.lucene.search.Weight weight)
           
 
Method Summary
protected  org.apache.lucene.search.Scorer createScorer(org.apache.lucene.index.IndexReader reader)
          Abstract factory method for crating a scorer instance for the specified reader.
 org.apache.lucene.search.Explanation explain(org.apache.lucene.index.IndexReader reader, int doc)
          
 org.apache.lucene.search.Query getQuery()
          
 float getValue()
          
 void normalize(float norm)
          
 org.apache.lucene.search.Scorer scorer(org.apache.lucene.index.IndexReader reader)
          

Returns a MultiScorer if the passed reader is of type MultiIndexReader.

 float sumOfSquaredWeights()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

searcher

protected final org.apache.lucene.search.Searcher searcher
The searcher for this weight.

Constructor Detail

JackrabbitTermQuery.JackrabbitTermWeight

public JackrabbitTermQuery.JackrabbitTermWeight(org.apache.lucene.search.Searcher searcher,
                                                org.apache.lucene.search.Weight weight)
Method Detail

createScorer

protected org.apache.lucene.search.Scorer createScorer(org.apache.lucene.index.IndexReader reader)
                                                throws IOException
Abstract factory method for crating a scorer instance for the specified reader.

Parameters:
reader - the index reader the created scorer instance should use
Returns:
the scorer instance
Throws:
IOException - if an error occurs while reading from the index

getQuery

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


getValue

public float getValue()


sumOfSquaredWeights

public float sumOfSquaredWeights()
                          throws IOException

Throws:
IOException

normalize

public void normalize(float norm)


explain

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

Throws:
IOException

scorer

public org.apache.lucene.search.Scorer scorer(org.apache.lucene.index.IndexReader reader)
                                       throws IOException

Returns a MultiScorer if the passed reader is of type MultiIndexReader.

Specified by:
scorer in interface org.apache.lucene.search.Weight
Throws:
IOException


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.