org.apache.lucene.search.function
public abstract class DocValues extends Object
ValueSuorce
for a particular field and reader.
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.
Constructor Summary | |
---|---|
DocValues(int nVals)
Constructor with input number of values(docs). |
Method Summary | |
---|---|
double | doubleVal(int doc)
Return doc value as a double.
|
Explanation | explain(int doc)
Explain the scoring value for the input doc. |
abstract float | floatVal(int doc)
Return doc value as a float.
|
float | getAverageValue()
Returns the average of all values. |
float | getMaxValue()
Optional op.
|
float | getMinValue()
Optional op.
|
int | intVal(int doc)
Return doc value as an int.
|
long | longVal(int doc)
Return doc value as a long.
|
String | strVal(int doc)
Return doc value as a string.
|
abstract String | toString(int doc)
Return a string representation of a doc value, as reuired for Explanations. |
Parameters: nVals
Optional: DocValues implementation can (but don't have to) override this method.
Parameters: doc document whose double value is requested.
Mandatory: every DocValues implementation must implement at least this method.
Parameters: doc document whose float value is requested.
Optional: DocValues implementation can (but don't have to) override this method.
Parameters: doc document whose int value is requested.
Optional: DocValues implementation can (but don't have to) override this method.
Parameters: doc document whose long value is requested.
Optional: DocValues implementation can (but don't have to) override this method.
Parameters: doc document whose string value is requested.