Skip to content
Snippets Groups Projects
Unverified Commit 9552d6b3 authored by Simonas Šerlinskas's avatar Simonas Šerlinskas
Browse files

Merge branch '6.x'

parents b8fc0ae6 6f9ba45d
No related branches found
No related tags found
No related merge requests found
......@@ -91,6 +91,7 @@ class FunctionScoreQuery implements BuilderInterface
* @param array $function
* @param array $options
* @param BuilderInterface $query
* @param int $weight
*
* @return $this
*/
......@@ -99,14 +100,18 @@ class FunctionScoreQuery implements BuilderInterface
$field,
array $function,
array $options = [],
BuilderInterface $query = null
BuilderInterface $query = null,
$weight = null
) {
$function = [
$type => array_merge(
[$field => $function],
$options
),
];
$function = array_filter(
[
$type => array_merge(
[$field => $function],
$options
),
'weight' => $weight,
]
);
$this->applyFilter($function, $query);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment