Lines Matching refs:function

10  * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html
58 public function setQuery(AbstractQuery $query): self
64 * Add a function to the function_score query.
67 * @param AbstractScript|array|float $functionParams the body of the function. See documentation for proper syntax.
68 * @param AbstractQuery|null $filter filter to apply to the function
69 * @param float|null $weight function weight
73 public function addFunction(
79 $function = [
84 $function['filter'] = $filter;
88 $function['weight'] = $weight;
91 $this->_functions[] = $function;
97 * Add a script_score function to the query.
100 * @param AbstractQuery|null $filter an optional filter to apply to the function
101 * @param float|null $weight the weight of the function
105 public function addScriptScoreFunction(AbstractScript $script, ?AbstractQuery $filter = null, ?float $weight = null)
111 * Add a decay function to the query.
115 * @param string $function see DECAY_* constants for valid options
116 * @param string $field the document field on which to perform the decay function
117 * @param string $origin the origin value for this decay function
118 * @param string $scale a scale to define the rate of decay for this function
119 * @param string|null $offset If defined, this function will only be computed for documents with a distance from the origin greater than this value
122 * @param AbstractQuery|null $filter a filter associated with this function
127 public function addDecayFunction(
128 string $function,
155 return $this->addFunction($function, $functionParams, $filter, $weight);
161 public function addFieldValueFactorFunction(
189 * @param float $weight the weight of the function
190 * @param AbstractQuery|null $filter a filter associated with this function
194 public function addWeightFunction(float $weight, ?AbstractQuery $filter = null): self
200 * Add a random_score function to the query.
203 * @param AbstractQuery|null $filter a filter associated with this function
204 * @param float|null $weight an optional boost value associated with this function
209 public function addRandomScoreFunction(
231 public function setBoost(float $boost): self
241 public function setMaxBoost(float $maxBoost): self
253 public function setBoostMode(string $mode = self::BOOST_MODE_MULTIPLY): self
265 public function setRandomScore(?int $seed = null): self
282 public function setScoreMode(string $mode = self::SCORE_MODE_MULTIPLY): self
292 public function setMinScore(float $minScore): self
300 public function toArray(): array