Home » lucene-3.0.1-src » org.apache » lucene » search » function » [javadoc | source]
org.apache.lucene.search.function
public class: ValueSourceQuery [javadoc | source]
java.lang.Object
   org.apache.lucene.search.Query
      org.apache.lucene.search.function.ValueSourceQuery

All Implemented Interfaces:
    Cloneable, Serializable

Direct Known Subclasses:
    FieldScoreQuery

Expert: A Query that sets the scores of document to the values obtained from a ValueSource .

This query provides a score for each and every undeleted document in the index.

The value source can be based on a (cached) value of an indexed field, but it can also be based on an external source, e.g. values read from an external database.

Score is set as: Score(doc,query) = query.getBoost()2 * valueSource(doc).

WARNING: The status of the search.function package is experimental. The APIs introduced here might change in the future and will not be supported anymore in such a case.
Nested Class Summary:
class  ValueSourceQuery.ValueSourceWeight   
Field Summary
 ValueSource valSrc     
Constructor:
 public ValueSourceQuery(ValueSource valSrc) 
    Create a value source query
    Parameters:
    valSrc - provides the values defines the function to be used for scoring
Method from org.apache.lucene.search.function.ValueSourceQuery Summary:
createWeight,   equals,   extractTerms,   hashCode,   rewrite,   toString
Methods from org.apache.lucene.search.Query:
clone,   combine,   createWeight,   equals,   extractTerms,   getBoost,   getSimilarity,   hashCode,   mergeBooleanQueries,   rewrite,   setBoost,   toString,   toString,   weight
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.search.function.ValueSourceQuery Detail:
 public Weight createWeight(Searcher searcher) 
 public boolean equals(Object o) 
    Returns true if o is equal to this.
 public  void extractTerms(Set<Term> terms) 
 public int hashCode() 
    Returns a hash code value for this object.
 public Query rewrite(IndexReader reader) throws IOException 
 public String toString(String field)