diff --git a/src/Query/FunctionScoreQuery.php b/src/Query/FunctionScoreQuery.php index 68f51b49f105dd6f58f42822574998579d2f9adc..9f5c31ced198138f41ce481f105ee660ebfc9533 100644 --- a/src/Query/FunctionScoreQuery.php +++ b/src/Query/FunctionScoreQuery.php @@ -117,10 +117,10 @@ class FunctionScoreQuery implements BuilderInterface BuilderInterface $filter = null ) { $function = [ - $type => [ - $field => $function, - ], - $options + $type => array_merge( + [$field => $function], + $options + ), ]; $this->applyFilter($function, $filter);