org.apache.solr.search.function
Class FunctionQuery

java.lang.Object
  extended by org.apache.lucene.search.Query
      extended by org.apache.solr.search.function.FunctionQuery
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

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

Returns a score for each document based on a ValueSource, often some function of the value of a field.

Version:
$Id: FunctionQuery.java 472574 2006-11-08 18:25:52Z yonik $
Author:
yonik
See Also:
Serialized Form

Nested Class Summary
protected  class FunctionQuery.AllScorer
           
protected  class FunctionQuery.FunctionWeight
           
 
Constructor Summary
FunctionQuery(ValueSource func)
           
 
Method Summary
protected  org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.Searcher searcher)
           
 boolean equals(java.lang.Object o)
          Returns true if o is equal to this.
 void extractTerms(java.util.Set terms)
           
 int hashCode()
          Returns a hash code value for this object.
 org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader)
           
 java.lang.String toString(java.lang.String field)
          Prints a user-readable version of this query.
 
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FunctionQuery

public FunctionQuery(ValueSource func)
Parameters:
func - defines the function to be used for scoring
Method Detail

rewrite

public org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader)
                                       throws java.io.IOException
Overrides:
rewrite in class org.apache.lucene.search.Query
Throws:
java.io.IOException

extractTerms

public void extractTerms(java.util.Set terms)
Overrides:
extractTerms in class org.apache.lucene.search.Query

createWeight

protected org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.Searcher searcher)
Overrides:
createWeight in class org.apache.lucene.search.Query

toString

public java.lang.String toString(java.lang.String field)
Prints a user-readable version of this query.

Specified by:
toString in class org.apache.lucene.search.Query

equals

public boolean equals(java.lang.Object o)
Returns true if o is equal to this.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class java.lang.Object


Copyright © 2006 - 2009 The Apache Software Foundation