Class FunctionValues
java.lang.Object
org.apache.lucene.queries.function.FunctionValues
- Direct Known Subclasses:
BoolDocValues,DocTermsIndexDocValues,DoubleDocValues,FloatDocValues,IntDocValues,LongDocValues,MultiFunction.Values,StrDocValues
Represents field values as different types.
Normally created via a
ValueSource for a particular field and reader.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbstraction of the logic required to fill the value of a specified doc into a reusableMutableValue. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanboolVal(int doc) booleanreturns the bytes representation of the string val - TODO: should this return the indexed raw bytes not?bytebyteVal(int doc) voidbyteVal(int doc, byte[] vals) doubledoubleVal(int doc) voiddoubleVal(int doc, double[] vals) booleanexists(int doc) Returns true if there is a value for this documentexplain(int doc) floatfloatVal(int doc) voidfloatVal(int doc, float[] vals) getRangeScorer(IndexReader reader, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper) getScorer(IndexReader reader) intintVal(int doc) voidintVal(int doc, int[] vals) longlongVal(int doc) voidlongVal(int doc, long[] vals) intnumOrd()objectVal(int doc) Native Java Object representation of the valueintordVal(int doc) shortshortVal(int doc) voidshortVal(int doc, short[] vals) strVal(int doc) voidabstract StringtoString(int doc)
-
Constructor Details
-
FunctionValues
public FunctionValues()
-
-
Method Details
-
byteVal
public byte byteVal(int doc) -
shortVal
public short shortVal(int doc) -
floatVal
public float floatVal(int doc) -
intVal
public int intVal(int doc) -
longVal
public long longVal(int doc) -
doubleVal
public double doubleVal(int doc) -
strVal
-
boolVal
public boolean boolVal(int doc) -
bytesVal
returns the bytes representation of the string val - TODO: should this return the indexed raw bytes not? -
objectVal
Native Java Object representation of the value -
exists
public boolean exists(int doc) Returns true if there is a value for this document -
ordVal
public int ordVal(int doc) - Parameters:
doc- The doc to retrieve to sort ordinal for- Returns:
- the sort ordinal for the specified doc TODO: Maybe we can just use intVal for this...
-
numOrd
public int numOrd()- Returns:
- the number of unique sort ordinals this instance has
-
toString
-
getValueFiller
-
byteVal
public void byteVal(int doc, byte[] vals) -
shortVal
public void shortVal(int doc, short[] vals) -
floatVal
public void floatVal(int doc, float[] vals) -
intVal
public void intVal(int doc, int[] vals) -
longVal
public void longVal(int doc, long[] vals) -
doubleVal
public void doubleVal(int doc, double[] vals) -
strVal
-
explain
-
getScorer
-
getRangeScorer
public ValueSourceScorer getRangeScorer(IndexReader reader, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper)
-