Class ConstValueSource
java.lang.Object
org.apache.lucene.queries.function.ValueSource
org.apache.lucene.queries.function.valuesource.ConstNumberSource
org.apache.lucene.queries.function.valuesource.ConstValueSource
ConstValueSource returns a constant for all documents-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondescription of field, used in explain()booleanbooleangetBool()doublefloatgetFloat()intgetInt()longgetLong()getValues(Map context, AtomicReaderContext readerContext) Gets the values for this reader and the context that was previously passed to createWeight()inthashCode()Methods inherited from class org.apache.lucene.queries.function.ValueSource
createWeight, getSortField, newContext, toString
-
Constructor Details
-
ConstValueSource
public ConstValueSource(float constant)
-
-
Method Details
-
description
Description copied from class:ValueSourcedescription of field, used in explain()- Specified by:
descriptionin classValueSource
-
getValues
Description copied from class:ValueSourceGets the values for this reader and the context that was previously passed to createWeight()- Specified by:
getValuesin classValueSource- Throws:
IOException
-
hashCode
public int hashCode()- Specified by:
hashCodein classValueSource
-
equals
- Specified by:
equalsin classValueSource
-
getInt
public int getInt()- Specified by:
getIntin classConstNumberSource
-
getLong
public long getLong()- Specified by:
getLongin classConstNumberSource
-
getFloat
public float getFloat()- Specified by:
getFloatin classConstNumberSource
-
getDouble
public double getDouble()- Specified by:
getDoublein classConstNumberSource
-
getNumber
- Specified by:
getNumberin classConstNumberSource
-
getBool
public boolean getBool()- Specified by:
getBoolin classConstNumberSource
-