BOOST_MODE_MULTIPLY
BOOST_MODE_MULTIPLY
Class FunctionScore.
This function can be used to handle params for queries, filter
setQuery(\Elastica\Query\AbstractQuery $query) : $this
Set the child query for this function_score query.
\Elastica\Query\AbstractQuery | $query |
addFunction(string $functionType, array|float|\Elastica\Script\AbstractScript $functionParams, \Elastica\Query\AbstractQuery $filter = null, float $weight = null) : $this
Add a function to the function_score query.
string | $functionType | valid values are DECAY_* constants and script_score |
array|float|\Elastica\Script\AbstractScript | $functionParams | the body of the function. See documentation for proper syntax. |
\Elastica\Query\AbstractQuery | $filter | filter to apply to the function |
float | $weight | function weight |
addScriptScoreFunction(\Elastica\Script\AbstractScript $script, \Elastica\Query\AbstractQuery $filter = null, float $weight = null) : $this
Add a script_score function to the query.
\Elastica\Script\AbstractScript | $script | a Script object |
\Elastica\Query\AbstractQuery | $filter | an optional filter to apply to the function |
float | $weight | the weight of the function |
addDecayFunction(string $function, string $field, string $origin, string $scale, string $offset = null, float $decay = null, float $weight = null, \Elastica\Query\AbstractQuery $filter = null, string $multiValueMode = null) : $this
Add a decay function to the query.
string | $function | see DECAY_* constants for valid options |
string | $field | the document field on which to perform the decay function |
string | $origin | the origin value for this decay function |
string | $scale | a scale to define the rate of decay for this function |
string | $offset | If defined, this function will only be computed for documents with a distance from the origin greater than this value |
float | $decay | optionally defines how documents are scored at the distance given by the $scale parameter |
float | $weight | optional factor by which to multiply the score at the value provided by the $scale parameter |
\Elastica\Query\AbstractQuery | $filter | a filter associated with this function |
string | $multiValueMode | see MULTI_VALUEMODE* constants for valid options |
addFieldValueFactorFunction(string $field, float|null $factor = null, string|null $modifier = null, float|null $missing = null, float|null $weight = null, \Elastica\Query\AbstractQuery|null $filter = null) : $this
string | $field | |
float|null | $factor | |
string|null | $modifier | |
float|null | $missing | |
float|null | $weight | |
\Elastica\Query\AbstractQuery|null | $filter |
addWeightFunction(float $weight, \Elastica\Query\AbstractQuery $filter = null) : $this
float | $weight | the weight of the function |
\Elastica\Query\AbstractQuery | $filter | a filter associated with this function |
addRandomScoreFunction(integer $seed, \Elastica\Query\AbstractQuery $filter = null, float $weight = null, string $field = null) : $this
Add a random_score function to the query.
integer | $seed | the seed value |
\Elastica\Query\AbstractQuery | $filter | a filter associated with this function |
float | $weight | an optional boost value associated with this function |
string | $field | the field to be used for random number generation |