Package org.apache.lucene.queries.function.valuesource
package org.apache.lucene.queries.function.valuesource
A variety of functions to use with FunctionQuery.
-
ClassesClassDescriptionAbstract parent class for those
ValueSourceimplementations which apply boolean logic to their valuesAn implementation for retrievingFunctionValuesinstances for byte knn vectors fields.An implementation for retrievingFunctionValuesinstances for string based fields.ByteVectorSimilarityFunctionreturns a similarity function between two knn vectors with byte elements.Base class for comparison operators useful within an "if"/conditional.Function that returns a constant byte vector value for every document.Function that returns a constant float vector value for every document.ConstNumberSourceis the base class for all constant numbersConstValueSourcereturns a constant for all documentsValueSourceimplementation which only returns the values from the provided ValueSources which are available for a particular docId.Function to divide "a" by "b"DocFreqValueSourcereturns the number of documents containing the term.Function that returns a constant double value for every document.Obtains double field values fromLeafReader.getNumericDocValues(java.lang.String)and makes those values available as other numeric types, casting as needed.AbstractValueSourceimplementation which wraps two ValueSources and applies an extendible float function to their values.Obtains int field values fromLeafReader.getNumericDocValues(java.lang.String)and makes those values available as other numeric types, casting as needed.A base class for ValueSource implementations that retrieve values for a single field from DocValues.Obtains float field values fromLeafReader.getNumericDocValues(java.lang.String)and makes those values available as other numeric types, casting as needed.An implementation for retrievingFunctionValuesinstances for float knn vectors fields.FloatVectorSimilarityFunctionreturns a similarity function between two knn vectors with float elements.Function that returns#idf(long, long)for every document.Depending on the boolean value of theifSourcefunction, returns the value of thetrueSourceorfalseSourcefunction.Obtains int field values fromLeafReader.getNumericDocValues(java.lang.String)and makes those values available as other numeric types, casting as needed.Use a field value and find the Document Frequency within another field.LinearFloatFunctionimplements a linear function over anotherValueSource.Pass a the field value through as a String, no matter the type // Q: doesn't this mean it's a "string"?Obtains long field values fromLeafReader.getNumericDocValues(java.lang.String)and makes those values available as other numeric types, casting as needed.Returns the value ofIndexReader.maxDoc()for every document.MaxFloatFunctionreturns the max of its components.MinFloatFunctionreturns the min of its components.AbstractValueSourceimplementation which wraps multiple ValueSources and applies an extendible boolean function to their values.AbstractValueSourceimplementation which wraps multiple ValueSources and applies an extendible float function to their values.Abstract parent class forValueSourceimplementations that wrap multiple ValueSources and apply their own logic.Obtains double field values fromLeafReader.getSortedNumericDocValues(java.lang.String)and using aSortedNumericSelectorit gives a single-valued ValueSource view of a field.Obtains float field values fromLeafReader.getSortedNumericDocValues(java.lang.String)and using aSortedNumericSelectorit gives a single-valued ValueSource view of a field.Obtains int field values fromLeafReader.getSortedNumericDocValues(java.lang.String)and using aSortedNumericSelectorit gives a single-valued ValueSource view of a field.Obtains long field values fromLeafReader.getSortedNumericDocValues(java.lang.String)and using aSortedNumericSelectorit gives a single-valued ValueSource view of a field.AValueSourcethat abstractly representsValueSources for poly fields, and other things.Function that returns the decoded norm for every document.Returns the value ofIndexReader.numDocs()for every document.Function to raise the base "a" to the power "b"ProductFloatFunctionreturns the product of its components.QueryValueSourcereturns the relevance score of the queryRangeMapFloatFunctionimplements a map function over anotherValueSourcewhose values fall within min and max inclusive to target.ReciprocalFloatFunctionimplements a reciprocal function f(x) = a/(mx+b), based on the float value of a field or function as exported byValueSource.Scales values to be between min and max.BoolFunctionimplementation which applies an extendible boolean function to the values of a single wrappedValueSource.A simple float function with a single argumentA function with a single argumentRetrievesFunctionValuesinstances for multi-valued string based fields.SumFloatFunctionreturns the sum of its components.SumTotalTermFreqValueSourcereturns the number of tokens.Function that returnsPostingsEnum.freq()for the supplied term in every document.Function that returnsTFIDFSimilarity.tf(float)for every document.TotalTermFreqValueSourcereturns the total term freq (sum of term freqs across all documents).An implementation for retrievingFunctionValuesinstances for knn vectors fields.VectorSimilarityFunctionreturns a similarity function between two knn vectors.Converts individual ValueSource instances to leverage the FunctionValues *Val functions that work with multiple values, i.e.