# Uses of Class
org.apache.lucene.queries.function.ValueSource

Packages that use ValueSource
Package
Description
org.apache.lucene.queries.function
Queries that compute score based upon a function.
org.apache.lucene.queries.function.docvalues
FunctionValues for different data types.
org.apache.lucene.queries.function.valuesource
A variety of functions to use with FunctionQuery.

## Uses of ValueSource in org.apache.lucene.queries.function

Methods in org.apache.lucene.queries.function that return ValueSource
Modifier and Type
Method
Description
`static ValueSource`
ValueSource.`fromDoubleValuesSource(DoubleValuesSource in)`
`ValueSource`
FunctionQuery.`getValueSource()`
`ValueSource`
FunctionRangeQuery.`getValueSource()`
Constructors in org.apache.lucene.queries.function with parameters of type ValueSource
Modifier
Constructor
Description
``
`FunctionQuery(ValueSource func)`
``
`FunctionRangeQuery(ValueSource valueSource, Number lowerVal, Number upperVal, boolean includeLower, boolean includeUpper)`
``
`FunctionRangeQuery(ValueSource valueSource, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper)`

## Uses of ValueSource in org.apache.lucene.queries.function.docvalues

Fields in org.apache.lucene.queries.function.docvalues declared as ValueSource
Modifier and Type
Field
Description
`protected final ValueSource`
BoolDocValues.`vs`
`protected final ValueSource`
DocTermsIndexDocValues.`vs`
`protected final ValueSource`
DoubleDocValues.`vs`
`protected final ValueSource`
FloatDocValues.`vs`
`protected final ValueSource`
IntDocValues.`vs`
`protected final ValueSource`
LongDocValues.`vs`
`protected final ValueSource`
StrDocValues.`vs`
Constructors in org.apache.lucene.queries.function.docvalues with parameters of type ValueSource
Modifier
Constructor
Description
``
`BoolDocValues(ValueSource vs)`
``
`DocTermsIndexDocValues(ValueSource vs, LeafReaderContext context, String field)`
`protected`
`DocTermsIndexDocValues(ValueSource vs, SortedDocValues termsIndex)`
``
`DoubleDocValues(ValueSource vs)`
``
`FloatDocValues(ValueSource vs)`
``
`IntDocValues(ValueSource vs)`
``
`LongDocValues(ValueSource vs)`
``
`StrDocValues(ValueSource vs)`

## Uses of ValueSource in org.apache.lucene.queries.function.valuesource

Subclasses of ValueSource in org.apache.lucene.queries.function.valuesource
Modifier and Type
Class
Description
`class`
`BoolFunction`
Abstract parent class for those `ValueSource` implementations which apply boolean logic to their values
`class`
`ByteKnnVectorFieldSource`
An implementation for retrieving `FunctionValues` instances for byte knn vectors fields.
`class`
`BytesRefFieldSource`
An implementation for retrieving `FunctionValues` instances for string based fields.
`class`
`ByteVectorSimilarityFunction`
`ByteVectorSimilarityFunction` returns a similarity function between two knn vectors with byte elements.
`class`
`ComparisonBoolFunction`
Base class for comparison operators useful within an "if"/conditional.
`class`
`ConstKnnByteVectorValueSource`
Function that returns a constant byte vector value for every document.
`class`
`ConstKnnFloatValueSource`
Function that returns a constant float vector value for every document.
`class`
`ConstNumberSource`
`ConstNumberSource` is the base class for all constant numbers
`class`
`ConstValueSource`
`ConstValueSource` returns a constant for all documents
`class`
`DefFunction`
`ValueSource` implementation which only returns the values from the provided ValueSources which are available for a particular docId.
`class`
`DivFloatFunction`
Function to divide "a" by "b"
`class`
`DocFreqValueSource`
`DocFreqValueSource` returns the number of documents containing the term.
`class`
`DoubleConstValueSource`
Function that returns a constant double value for every document.
`class`
`DoubleFieldSource`
Obtains double field values from `LeafReader.getNumericDocValues(java.lang.String)` and makes those values available as other numeric types, casting as needed.
`class`
`DualFloatFunction`
Abstract `ValueSource` implementation which wraps two ValueSources and applies an extendible float function to their values.
`class`
`EnumFieldSource`
Obtains int field values from `LeafReader.getNumericDocValues(java.lang.String)` and makes those values available as other numeric types, casting as needed.
`class`
`FieldCacheSource`
A base class for ValueSource implementations that retrieve values for a single field from DocValues.
`class`
`FloatFieldSource`
Obtains float field values from `LeafReader.getNumericDocValues(java.lang.String)` and makes those values available as other numeric types, casting as needed.
`class`
`FloatKnnVectorFieldSource`
An implementation for retrieving `FunctionValues` instances for float knn vectors fields.
`class`
`FloatVectorSimilarityFunction`
`FloatVectorSimilarityFunction` returns a similarity function between two knn vectors with float elements.
`class`
`IDFValueSource`
Function that returns `#idf(long, long)` for every document.
`class`
`IfFunction`
Depending on the boolean value of the `ifSource` function, returns the value of the `trueSource` or `falseSource` function.
`class`
`IntFieldSource`
Obtains int field values from `LeafReader.getNumericDocValues(java.lang.String)` and makes those values available as other numeric types, casting as needed.
`class`
`JoinDocFreqValueSource`
Use a field value and find the Document Frequency within another field.
`class`
`LinearFloatFunction`
`LinearFloatFunction` implements a linear function over another `ValueSource`.
`class`
`LiteralValueSource`
Pass a the field value through as a String, no matter the type // Q: doesn't this mean it's a "string"?
`class`
`LongFieldSource`
Obtains long field values from `LeafReader.getNumericDocValues(java.lang.String)` and makes those values available as other numeric types, casting as needed.
`class`
`MaxDocValueSource`
Returns the value of `IndexReader.maxDoc()` for every document.
`class`
`MaxFloatFunction`
`MaxFloatFunction` returns the max of its components.
`class`
`MinFloatFunction`
`MinFloatFunction` returns the min of its components.
`class`
`MultiBoolFunction`
Abstract `ValueSource` implementation which wraps multiple ValueSources and applies an extendible boolean function to their values.
`class`
`MultiFloatFunction`
Abstract `ValueSource` implementation which wraps multiple ValueSources and applies an extendible float function to their values.
`class`
`MultiFunction`
Abstract parent class for `ValueSource` implementations that wrap multiple ValueSources and apply their own logic.
`class`
`MultiValuedDoubleFieldSource`
Obtains double field values from `LeafReader.getSortedNumericDocValues(java.lang.String)` and using a `SortedNumericSelector` it gives a single-valued ValueSource view of a field.
`class`
`MultiValuedFloatFieldSource`
Obtains float field values from `LeafReader.getSortedNumericDocValues(java.lang.String)` and using a `SortedNumericSelector` it gives a single-valued ValueSource view of a field.
`class`
`MultiValuedIntFieldSource`
Obtains int field values from `LeafReader.getSortedNumericDocValues(java.lang.String)` and using a `SortedNumericSelector` it gives a single-valued ValueSource view of a field.
`class`
`MultiValuedLongFieldSource`
Obtains long field values from `LeafReader.getSortedNumericDocValues(java.lang.String)` and using a `SortedNumericSelector` it gives a single-valued ValueSource view of a field.
`class`
`MultiValueSource`
A `ValueSource` that abstractly represents `ValueSource`s for poly fields, and other things.
`class`
`NormValueSource`
Function that returns the decoded norm for every document.
`class`
`NumDocsValueSource`
Returns the value of `IndexReader.numDocs()` for every document.
`class`
`PowFloatFunction`
Function to raise the base "a" to the power "b"
`class`
`ProductFloatFunction`
`ProductFloatFunction` returns the product of its components.
`class`
`QueryValueSource`
`QueryValueSource` returns the relevance score of the query
`class`
`RangeMapFloatFunction`
`RangeMapFloatFunction` implements a map function over another `ValueSource` whose values fall within min and max inclusive to target.
`class`
`ReciprocalFloatFunction`
`ReciprocalFloatFunction` implements a reciprocal function f(x) = a/(mx+b), based on the float value of a field or function as exported by `ValueSource`.
`class`
`ScaleFloatFunction`
Scales values to be between min and max.
`class`
`SimpleBoolFunction`
`BoolFunction` implementation which applies an extendible boolean function to the values of a single wrapped `ValueSource`.
`class`
`SimpleFloatFunction`
A simple float function with a single argument
`class`
`SingleFunction`
A function with a single argument
`class`
`SortedSetFieldSource`
Retrieves `FunctionValues` instances for multi-valued string based fields.
`class`
`SumFloatFunction`
`SumFloatFunction` returns the sum of its components.
`class`
`SumTotalTermFreqValueSource`
`SumTotalTermFreqValueSource` returns the number of tokens.
`class`
`TermFreqValueSource`
Function that returns `PostingsEnum.freq()` for the supplied term in every document.
`class`
`TFValueSource`
Function that returns `TFIDFSimilarity.tf(float)` for every document.
`class`
`TotalTermFreqValueSource`
`TotalTermFreqValueSource` returns the total term freq (sum of term freqs across all documents).
`class`
`VectorSimilarityFunction`
`VectorSimilarityFunction` returns a similarity function between two knn vectors.
`class`
`VectorValueSource`
Converts individual ValueSource instances to leverage the FunctionValues *Val functions that work with multiple values, i.e.
Fields in org.apache.lucene.queries.function.valuesource declared as ValueSource
Modifier and Type
Field
Description
`protected final ValueSource`
DualFloatFunction.`a`
`protected final ValueSource`
DualFloatFunction.`b`
`protected final ValueSource`
RangeMapFloatFunction.`defaultVal`
`protected final ValueSource`
LinearFloatFunction.`source`
`protected final ValueSource`
RangeMapFloatFunction.`source`
`protected final ValueSource`
ReciprocalFloatFunction.`source`
`protected final ValueSource`
ScaleFloatFunction.`source`
`protected final ValueSource`
SimpleBoolFunction.`source`
`protected final ValueSource`
SingleFunction.`source`
`protected final ValueSource[]`
MultiFloatFunction.`sources`
`protected final ValueSource`
RangeMapFloatFunction.`target`
`protected final ValueSource`
VectorFieldFunction.`valueSource`
`protected final ValueSource`
VectorSimilarityFunction.`vector1`
`protected final ValueSource`
VectorSimilarityFunction.`vector2`
Fields in org.apache.lucene.queries.function.valuesource with type parameters of type ValueSource
Modifier and Type
Field
Description
`protected final List<ValueSource>`
MultiBoolFunction.`sources`
`protected final List<ValueSource>`
MultiFunction.`sources`
`protected final List<ValueSource>`
VectorValueSource.`sources`
Methods in org.apache.lucene.queries.function.valuesource that return types with arguments of type ValueSource
Modifier and Type
Method
Description
`List<ValueSource>`
VectorValueSource.`getSources()`
Method parameters in org.apache.lucene.queries.function.valuesource with type arguments of type ValueSource
Modifier and Type
Method
Description
`static String`
MultiFunction.`description(String name, List<ValueSource> sources)`
`static FunctionValues[]`
MultiFunction.`valsArr(List<ValueSource> sources, Map<Object,Object> fcontext, LeafReaderContext readerContext)`
Constructors in org.apache.lucene.queries.function.valuesource with parameters of type ValueSource
Modifier
Constructor
Description
``
`ByteVectorSimilarityFunction(VectorSimilarityFunction similarityFunction, ValueSource vector1, ValueSource vector2)`
``
`ComparisonBoolFunction(ValueSource lhs, ValueSource rhs, String name)`
``
`DivFloatFunction(ValueSource a, ValueSource b)`
``
`DualFloatFunction(ValueSource a, ValueSource b)`
``
`FloatVectorSimilarityFunction(VectorSimilarityFunction similarityFunction, ValueSource vector1, ValueSource vector2)`
``
`IfFunction(ValueSource ifSource, ValueSource trueSource, ValueSource falseSource)`
``
`LinearFloatFunction(ValueSource source, float slope, float intercept)`
``
`MaxFloatFunction(ValueSource[] sources)`
``
`MinFloatFunction(ValueSource[] sources)`
``
`MultiFloatFunction(ValueSource[] sources)`
``
`PowFloatFunction(ValueSource a, ValueSource b)`
``
`ProductFloatFunction(ValueSource[] sources)`
``
`RangeMapFloatFunction(ValueSource source, float min, float max, float target, Float def)`
``
`RangeMapFloatFunction(ValueSource source, float min, float max, ValueSource target, ValueSource def)`
``
`ReciprocalFloatFunction(ValueSource source, float m, float a, float b)`
f(source) = a/(m*float(source)+b)
``
`ScaleFloatFunction(ValueSource source, float min, float max)`
``
`SimpleBoolFunction(ValueSource source)`
``
`SimpleFloatFunction(ValueSource source)`
``
`SingleFunction(ValueSource source)`
``
`SumFloatFunction(ValueSource[] sources)`
`protected`
`VectorFieldFunction(ValueSource valueSource)`
``
`VectorSimilarityFunction(VectorSimilarityFunction similarityFunction, ValueSource vector1, ValueSource vector2)`
Constructor parameters in org.apache.lucene.queries.function.valuesource with type arguments of type ValueSource
Modifier
Constructor
Description
``
`DefFunction(List<ValueSource> sources)`
``
`MultiBoolFunction(List<ValueSource> sources)`
``
`MultiFunction(List<ValueSource> sources)`
``
`VectorValueSource(List<ValueSource> sources)`