Companion
Functions
Compute a feature value that may be used as the pivot parameter of the .newSaturationQuery and .newSigmoidQuery factory methods. The implementation takes the average of the int bits of the float representation in practice before converting it back to a float. Given that floats store the exponent in the higher bits, it means that the result will be an approximation of the geometric mean of all feature values.
Creates a DoubleValuesSource instance which can be used to read the values of a feature from the a FeatureField for documents.
Creates a SortField for sorting by the value of a feature.
Same as .newSaturationQuery but 1f is used as a weight and a reasonably good default pivot value is computed based on index statistics and is approximately equal to the geometric mean of all values that exist in the index.
Return a new Query that will score documents as weight * S / (S + pivot) where S is the value of the static feature.