Property | Type | Description | |
---|---|---|---|
$_functions |
Method | Description | |
---|---|---|
addDecayFunction ( string $function, string $field, string $origin, string $scale, string $offset = null, float $decay = null, float $weight = null, AbstractQuery $filter = null, string $multiValueMode = null ) | Add a decay function to the query. | |
addFieldValueFactorFunction ( $field, $factor = null, $modifier = null, $missing = null, $weight = null, AbstractQuery $filter = null ) | ||
addFunction ( string $functionType, array | float $functionParams, AbstractQuery $filter = null, float $weight = null ) | Add a function to the function_score query. | |
addRandomScoreFunction ( number $seed, AbstractQuery $filter = null, float $weight = null ) | Add a random_score function to the query. | |
addScriptScoreFunction ( Elastica\Script\AbstractScript $script, AbstractQuery $filter = null, float $weight = null ) | Add a script_score function to the query. | |
addWeightFunction ( float $weight, AbstractQuery $filter = null ) | ||
setBoost ( float $boost ) | Set an overall boost value for this query. | |
setBoostMode ( string $mode ) | The boost mode determines how the score of this query is combined with that of the child query. | |
setMaxBoost ( float $maxBoost ) | Restrict the combined boost of the function_score query and its child query. | |
setMinScore ( float $minScore ) | Set min_score option. | |
setQuery ( AbstractQuery $query ) | Set the child query for this function_score query. | |
setRandomScore ( integer $seed = null ) | If set, this query will return results in random order. | |
setScoreMode ( string $mode ) | Set the score method. | |
toArray ( ) : array |
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 |
public addFieldValueFactorFunction ( $field, $factor = null, $modifier = null, $missing = null, $weight = null, AbstractQuery $filter = null ) | ||
$filter | AbstractQuery |
public addFunction ( string $functionType, array | float $functionParams, AbstractQuery $filter = null, float $weight = null ) | ||
$functionType | string | valid values are DECAY_* constants and script_score |
$functionParams | array | float | the body of the function. See documentation for proper syntax. |
$filter | AbstractQuery | optional filter to apply to the function |
$weight | float | function weight |
public addRandomScoreFunction ( number $seed, AbstractQuery $filter = null, float $weight = null ) | ||
$seed | number | the seed value |
$filter | AbstractQuery | a filter associated with this function |
$weight | float | an optional boost value associated with this function |
public addScriptScoreFunction ( Elastica\Script\AbstractScript $script, AbstractQuery $filter = null, float $weight = null ) | ||
$script | Elastica\Script\AbstractScript | a Script object |
$filter | AbstractQuery | an optional filter to apply to the function |
$weight | float | the weight of the function |
public addWeightFunction ( float $weight, AbstractQuery $filter = null ) | ||
$weight | float | the weight of the function |
$filter | AbstractQuery | a filter associated with this function |
public setBoostMode ( string $mode ) | ||
$mode | string | see BOOST_MODE_* constants for valid options. Default is multiply. |
public setMaxBoost ( float $maxBoost ) | ||
$maxBoost | float |
public setMinScore ( float $minScore ) | ||
$minScore | float |
public setQuery ( AbstractQuery $query ) | ||
$query | AbstractQuery |
public setRandomScore ( integer $seed = null ) | ||
$seed | integer | Set a seed value to return results in the same random order for consistent pagination. |
public setScoreMode ( string $mode ) | ||
$mode | string | see SCORE_MODE_* constants for valid options. Default is multiply. |