We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1bf7b5 commit 521a61dCopy full SHA for 521a61d
1 file changed
src/Query/Nested.php
@@ -32,11 +32,19 @@ public function key(): string
32
33
public function toArray(): array
34
{
35
+ $queryArray = $this->query->toArray();
36
+
37
+ if (count($queryArray) === 0) {
38
+ $queryArray = [
39
+ 'bool' => [],
40
+ ];
41
+ }
42
43
return [
44
'nested' => [
45
'path' => $this->path,
46
'query' => [
- 'bool' => $this->query->toArray(),
47
+ $queryArray,
48
],
49
50
];
0 commit comments