Home » lucene-3.0.1-src » org.apache » lucene » search » function » [javadoc | source]
org.apache.lucene.search.function
abstract public class: DocValues [javadoc | source]
java.lang.Object
   org.apache.lucene.search.function.DocValues
Expert: represents field values as different types. Normally created via a 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.
Method from org.apache.lucene.search.function.DocValues Summary:
doubleVal,   explain,   floatVal,   getAverageValue,   getInnerArray,   getMaxValue,   getMinValue,   intVal,   longVal,   strVal,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.search.function.DocValues Detail:
 public double doubleVal(int doc) 
    Return doc value as a double.

    Optional: DocValues implementation can (but don't have to) override this method.

 public Explanation explain(int doc) 
    Explain the scoring value for the input doc.
 abstract public float floatVal(int doc)
    Return doc value as a float.

    Mandatory: every DocValues implementation must implement at least this method.

 public float getAverageValue() 
    Returns the average of all values or Float.NaN if this DocValues instance does not contain any value. *

    This operation is optional

 Object getInnerArray() 
    Expert: for test purposes only, return the inner array of values, or null if not applicable.

    Allows tests to verify that loaded values are:

    1. indeed cached/reused.
    2. stored in the expected size/type (byte/short/int/float).
    Note: implementations of DocValues must override this method for these test elements to be tested, Otherwise the test would not fail, just print a warning.
 public float getMaxValue() 
    Returns the maximum of all values or Float.NaN if this DocValues instance does not contain any value.

    This operation is optional

 public float getMinValue() 
    Returns the minimum of all values or Float.NaN if this DocValues instance does not contain any value.

    This operation is optional

 public int intVal(int doc) 
    Return doc value as an int.

    Optional: DocValues implementation can (but don't have to) override this method.

 public long longVal(int doc) 
    Return doc value as a long.

    Optional: DocValues implementation can (but don't have to) override this method.

 public String strVal(int doc) 
    Return doc value as a string.

    Optional: DocValues implementation can (but don't have to) override this method.

 abstract public String toString(int doc)
    Return a string representation of a doc value, as required for Explanations.