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

Merge branch '5.x' into 6.x

# Conflicts:
#	composer.json
parents 82a1b914 83c47322
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