newSaturationQuery

fun newSaturationQuery(fieldName: String, featureName: String): Query

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.

Parameters

fieldName

field that stores features

featureName

name of the feature

Throws

if weight is not in (0,64] or pivot is not in (0, +Infinity)


fun newSaturationQuery(fieldName: String, featureName: String, weight: Float, pivot: Float?): Query

Return a new Query that will score documents as weight * S / (S + pivot) where S is the value of the static feature.

Parameters

fieldName

field that stores features

featureName

name of the feature

weight

weight to give to this feature, must be in (0,64]

pivot

feature value that would give a score contribution equal to weight/2, must be in (0, +Infinity)

Throws

if weight is not in (0,64] or pivot is not in (0, +Infinity)