Skip to content
Snippets Groups Projects
Commit f5ba75c4 authored by Aivaras Gotovskis's avatar Aivaras Gotovskis
Browse files

Use empty stdClass instead of empty array.

In method addRandomFunction.
Elasticsearch expects object not array and empty array will not be made into object.
parent 042fa88d
No related branches found
No related tags found
No related merge requests found
......@@ -162,7 +162,7 @@ class FunctionScoreQuery implements BuilderInterface
public function addRandomFunction($seed = null, BuilderInterface $filter = null)
{
$function = [
'random_score' => $seed ? [ 'seed' => $seed ] : [],
'random_score' => $seed ? [ 'seed' => $seed ] : new \stdClass(),
];
$this->applyFilter($function, $filter);
......
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