Add a decay function to the query.
public addDecayFunction ( string $function, string $field, string $origin, string $scale, string $offset = null, float $decay = null, float $weight = null, AbstractQuery $filter = null, string $multiValueMode = null ) | ||
$function | string | see DECAY_* constants for valid options |
$field | string | the document field on which to perform the decay function |
$origin | string | the origin value for this decay function |
$scale | string | a scale to define the rate of decay for this function |
$offset | string | If defined, this function will only be computed for documents with a distance from the origin greater than this value |
$decay | float | optionally defines how documents are scored at the distance given by the $scale parameter |
$weight | float | optional factor by which to multiply the score at the value provided by the $scale parameter |
$filter | AbstractQuery | a filter associated with this function |
$multiValueMode | string | see MULTI_VALUE_MODE_* constants for valid options |