FileDocCategorySizeDatePackage
ValueSource.javaAPI DocApache Lucene 2.2.02733Sat Jun 16 22:20:34 BST 2007org.apache.lucene.search.function

ValueSource

public abstract class ValueSource extends Object implements Serializable
Expert: source of values for basic function queries.

At its default/simplest form, values - one per doc - are used as the score of that doc.

Values are instantiated as {@link org.apache.lucene.search.function.DocValues DocValues} for a particular reader.

ValueSource implementations differ in RAM requirements: it would always be a factor of the number of documents, but for each document the number of bytes can be 1, 2, 4, or 8.

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.

author
yonik

Fields Summary
Constructors Summary
Methods Summary
public abstract java.lang.Stringdescription()
description of field, used in explain()

public abstract booleanequals(java.lang.Object o)
Needed for possible caching of query results - used by {@link ValueSourceQuery#equals(Object)}.

see
Object#equals(Object)

public abstract org.apache.lucene.search.function.DocValuesgetValues(org.apache.lucene.index.IndexReader reader)
Return the DocValues used by the function query.

param
reader the IndexReader used to read these values. If any caching is involved, that caching would also be IndexReader based.
throws
IOException for any error.

public abstract inthashCode()
Needed for possible caching of query results - used by {@link ValueSourceQuery#hashCode()}.

see
Object#hashCode()

public java.lang.StringtoString()

    return description();