org.apache.lucene.search.function
Class ValueSource
- java.lang.Object
-
- org.apache.lucene.search.function.ValueSource
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- FieldCacheSource, OrdFieldSource, ReverseOrdFieldSource
public abstract class ValueSource extends java.lang.Object implements java.io.SerializableExpert: 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
DocValuesfor 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.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ValueSource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract java.lang.Stringdescription()description of field, used in explain()abstract booleanequals(java.lang.Object o)Needed for possible caching of query results - used byValueSourceQuery.equals(Object).abstract DocValuesgetValues(IndexReader reader)Return the DocValues used by the function query.abstract inthashCode()Needed for possible caching of query results - used byValueSourceQuery.hashCode().java.lang.StringtoString()
-
-
-
Method Detail
-
getValues
public abstract DocValues getValues(IndexReader reader) throws java.io.IOException
Return the DocValues used by the function query.- Parameters:
reader- the IndexReader used to read these values. If any caching is involved, that caching would also be IndexReader based.- Throws:
java.io.IOException- for any error.
-
description
public abstract java.lang.String description()
description of field, used in explain()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public abstract boolean equals(java.lang.Object o)
Needed for possible caching of query results - used byValueSourceQuery.equals(Object).- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(Object)
-
hashCode
public abstract int hashCode()
Needed for possible caching of query results - used byValueSourceQuery.hashCode().- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG