Class FunctionValues
- java.lang.Object
-
- org.apache.lucene.queries.function.FunctionValues
-
- Direct Known Subclasses:
BoolDocValues
,DocTermsIndexDocValues
,DoubleDocValues
,FloatDocValues
,IntDocValues
,LongDocValues
,MultiFunction.Values
,StrDocValues
public abstract class FunctionValues extends java.lang.Object
Represents field values as different types. Normally created via aValueSource
for a particular field and reader.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FunctionValues.ValueFiller
Abstraction of the logic required to fill the value of a specified doc into a reusableMutableValue
.
-
Constructor Summary
Constructors Constructor Description FunctionValues()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
boolVal(int doc)
boolean
bytesVal(int doc, BytesRef target)
returns the bytes representation of the string val - TODO: should this return the indexed raw bytes not?byte
byteVal(int doc)
void
byteVal(int doc, byte[] vals)
double
doubleVal(int doc)
void
doubleVal(int doc, double[] vals)
boolean
exists(int doc)
Returns true if there is a value for this documentExplanation
explain(int doc)
float
floatVal(int doc)
void
floatVal(int doc, float[] vals)
ValueSourceScorer
getRangeScorer(IndexReader reader, java.lang.String lowerVal, java.lang.String upperVal, boolean includeLower, boolean includeUpper)
ValueSourceScorer
getScorer(IndexReader reader)
FunctionValues.ValueFiller
getValueFiller()
int
intVal(int doc)
void
intVal(int doc, int[] vals)
long
longVal(int doc)
void
longVal(int doc, long[] vals)
int
numOrd()
java.lang.Object
objectVal(int doc)
Native Java Object representation of the valueint
ordVal(int doc)
short
shortVal(int doc)
void
shortVal(int doc, short[] vals)
java.lang.String
strVal(int doc)
void
strVal(int doc, java.lang.String[] vals)
abstract java.lang.String
toString(int doc)
-
-
-
Method Detail
-
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
public java.lang.String strVal(int doc)
-
boolVal
public boolean boolVal(int doc)
-
bytesVal
public boolean bytesVal(int doc, BytesRef target)
returns the bytes representation of the string val - TODO: should this return the indexed raw bytes not?
-
objectVal
public java.lang.Object objectVal(int doc)
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
public abstract java.lang.String toString(int doc)
-
getValueFiller
public FunctionValues.ValueFiller 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
public void strVal(int doc, java.lang.String[] vals)
-
explain
public Explanation explain(int doc)
-
getScorer
public ValueSourceScorer getScorer(IndexReader reader)
-
getRangeScorer
public ValueSourceScorer getRangeScorer(IndexReader reader, java.lang.String lowerVal, java.lang.String upperVal, boolean includeLower, boolean includeUpper)
-
-