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
ValueSource
implementations which apply boolean logic to their valuesDeprecated.An implementation for retrievingFunctionValues
instances for string based fields.ConstNumberSource
is the base class for all constant numbersConstValueSource
returns a constant for all documentsValueSource
implementation which only returns the values from the provided ValueSources which are available for a particular docId.Function to divide "a" by "b"DocFreqValueSource
returns the number of documents containing the term.Function that returns a constant double value for every document.Obtains double field values fromFieldCache.getDoubles(org.apache.lucene.index.AtomicReader, java.lang.String, boolean)
and makes those values available as other numeric types, casting as needed.AbstractValueSource
implementation which wraps two ValueSources and applies an extendible float function to their values.Obtains int field values fromFieldCache.getInts(org.apache.lucene.index.AtomicReader, java.lang.String, boolean)
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 theFieldCache
.Obtains float field values fromFieldCache.getFloats(org.apache.lucene.index.AtomicReader, java.lang.String, boolean)
and makes those values available as other numeric types, casting as needed.Function that returns#idf(long, long)
for every document.Depending on the boolean value of theifSource
function, returns the value of thetrueSource
orfalseSource
function.Obtains int field values fromFieldCache.getInts(org.apache.lucene.index.AtomicReader, java.lang.String, boolean)
and makes those values available as other numeric types, casting as needed.Use a field value and find the Document Frequency within another field.LinearFloatFunction
implements 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 fromFieldCache.getLongs(org.apache.lucene.index.AtomicReader, java.lang.String, boolean)
and makes those values available as other numeric types, casting as needed.Returns the value ofIndexReader.maxDoc()
for every document.MaxFloatFunction
returns the max of it's components.MinFloatFunction
returns the min of it's components.AbstractValueSource
implementation which wraps multiple ValueSources and applies an extendible boolean function to their values.AbstractValueSource
implementation which wraps multiple ValueSources and applies an extendible float function to their values.Abstract parent class forValueSource
implementations that wrap multiple ValueSources and apply their own logic.AValueSource
that abstractly representsValueSource
s for poly fields, and other things.Function that returnsTFIDFSimilarity.decodeNormValue(long)
for every document.Returns the value ofIndexReader.numDocs()
for every document.Obtains the ordinal of the field value from the default LuceneFieldCache
using getStringIndex().Function to raise the base "a" to the power "b"ProductFloatFunction
returns the product of it's components.QueryValueSource
returns the relevance score of the queryRangeMapFloatFunction
implements a map function over anotherValueSource
whose values fall within min and max inclusive to target.ReciprocalFloatFunction
implements a reciprocal function f(x) = a/(mx+b), based on the float value of a field or function as exported byValueSource
.Obtains the ordinal of the field value from the default LuceneFieldCache
using getTermsIndex() and reverses the order.Scales values to be between min and max.Deprecated.BoolFunction
implementation 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 argumentSumFloatFunction
returns the sum of it's components.SumTotalTermFreqValueSource
returns the number of tokens.Function that returnsDocsEnum.freq()
for the supplied term in every document.Function that returnsTFIDFSimilarity.tf(float)
for every document.TotalTermFreqValueSource
returns the total term freq (sum of term freqs across all documents).Converts individual ValueSource instances to leverage the FunctionValues *Val functions that work with multiple values, i.e.