Package org.apache.lucene.queries.function.valuesource
A variety of functions to use with FunctionQuery.
-
Class Summary Class Description BoolFunction Abstract parent class for thoseValueSourceimplementations which apply boolean logic to their valuesByteKnnVectorFieldSource An implementation for retrievingFunctionValuesinstances for byte knn vectors fields.BytesRefFieldSource An implementation for retrievingFunctionValuesinstances for string based fields.ByteVectorSimilarityFunction ByteVectorSimilarityFunctionreturns a similarity function between two knn vectors with byte elements.ComparisonBoolFunction Base class for comparison operators useful within an "if"/conditional.ConstKnnByteVectorValueSource Function that returns a constant byte vector value for every document.ConstKnnFloatValueSource Function that returns a constant float vector value for every document.ConstNumberSource ConstNumberSourceis the base class for all constant numbersConstValueSource ConstValueSourcereturns a constant for all documentsDefFunction ValueSourceimplementation which only returns the values from the provided ValueSources which are available for a particular docId.DivFloatFunction Function to divide "a" by "b"DocFreqValueSource DocFreqValueSourcereturns the number of documents containing the term.DoubleConstValueSource Function that returns a constant double value for every document.DoubleFieldSource Obtains double field values fromLeafReader.getNumericDocValues(java.lang.String)and makes those values available as other numeric types, casting as needed.DualFloatFunction AbstractValueSourceimplementation which wraps two ValueSources and applies an extendible float function to their values.EnumFieldSource Obtains int field values fromLeafReader.getNumericDocValues(java.lang.String)and makes those values available as other numeric types, casting as needed.FieldCacheSource A base class for ValueSource implementations that retrieve values for a single field from DocValues.FloatFieldSource Obtains float field values fromLeafReader.getNumericDocValues(java.lang.String)and makes those values available as other numeric types, casting as needed.FloatKnnVectorFieldSource An implementation for retrievingFunctionValuesinstances for float knn vectors fields.FloatVectorSimilarityFunction FloatVectorSimilarityFunctionreturns a similarity function between two knn vectors with float elements.IDFValueSource Function that returns#idf(long, long)for every document.IfFunction Depending on the boolean value of theifSourcefunction, returns the value of thetrueSourceorfalseSourcefunction.IntFieldSource Obtains int field values fromLeafReader.getNumericDocValues(java.lang.String)and makes those values available as other numeric types, casting as needed.JoinDocFreqValueSource Use a field value and find the Document Frequency within another field.LinearFloatFunction LinearFloatFunctionimplements a linear function over anotherValueSource.LiteralValueSource Pass a the field value through as a String, no matter the type // Q: doesn't this mean it's a "string"?LongFieldSource Obtains long field values fromLeafReader.getNumericDocValues(java.lang.String)and makes those values available as other numeric types, casting as needed.MaxDocValueSource Returns the value ofIndexReader.maxDoc()for every document.MaxFloatFunction MaxFloatFunctionreturns the max of its components.MinFloatFunction MinFloatFunctionreturns the min of its components.MultiBoolFunction AbstractValueSourceimplementation which wraps multiple ValueSources and applies an extendible boolean function to their values.MultiFloatFunction AbstractValueSourceimplementation which wraps multiple ValueSources and applies an extendible float function to their values.MultiFunction Abstract parent class forValueSourceimplementations that wrap multiple ValueSources and apply their own logic.MultiValuedDoubleFieldSource Obtains double field values fromLeafReader.getSortedNumericDocValues(java.lang.String)and using aSortedNumericSelectorit gives a single-valued ValueSource view of a field.MultiValuedFloatFieldSource Obtains float field values fromLeafReader.getSortedNumericDocValues(java.lang.String)and using aSortedNumericSelectorit gives a single-valued ValueSource view of a field.MultiValuedIntFieldSource Obtains int field values fromLeafReader.getSortedNumericDocValues(java.lang.String)and using aSortedNumericSelectorit gives a single-valued ValueSource view of a field.MultiValuedLongFieldSource Obtains long field values fromLeafReader.getSortedNumericDocValues(java.lang.String)and using aSortedNumericSelectorit gives a single-valued ValueSource view of a field.MultiValueSource AValueSourcethat abstractly representsValueSources for poly fields, and other things.NormValueSource Function that returns the decoded norm for every document.NumDocsValueSource Returns the value ofIndexReader.numDocs()for every document.PowFloatFunction Function to raise the base "a" to the power "b"ProductFloatFunction ProductFloatFunctionreturns the product of its components.QueryValueSource QueryValueSourcereturns the relevance score of the queryRangeMapFloatFunction RangeMapFloatFunctionimplements a map function over anotherValueSourcewhose values fall within min and max inclusive to target.ReciprocalFloatFunction ReciprocalFloatFunctionimplements a reciprocal function f(x) = a/(mx+b), based on the float value of a field or function as exported byValueSource.ScaleFloatFunction Scales values to be between min and max.SimpleBoolFunction BoolFunctionimplementation which applies an extendible boolean function to the values of a single wrappedValueSource.SimpleFloatFunction A simple float function with a single argumentSingleFunction A function with a single argumentSortedSetFieldSource RetrievesFunctionValuesinstances for multi-valued string based fields.SumFloatFunction SumFloatFunctionreturns the sum of its components.SumTotalTermFreqValueSource SumTotalTermFreqValueSourcereturns the number of tokens.TermFreqValueSource Function that returnsPostingsEnum.freq()for the supplied term in every document.TFValueSource Function that returnsTFIDFSimilarity.tf(float)for every document.TotalTermFreqValueSource TotalTermFreqValueSourcereturns the total term freq (sum of term freqs across all documents).VectorFieldFunction An implementation for retrievingFunctionValuesinstances for knn vectors fields.VectorSimilarityFunction VectorSimilarityFunctionreturns a similarity function between two knn vectors.VectorValueSource Converts individual ValueSource instances to leverage the FunctionValues *Val functions that work with multiple values, i.e.