See More

query = $query; } public function key(): string { return 'nested_' . $this->path; } public function toArray(): array { $queryArray = $this->query->toArray(); if (\count($queryArray) === 0) { $queryArray = [ 'bool' => [], ]; } return [ 'nested' => [ 'path' => $this->path, 'query' => [ $queryArray, ], ], ]; } public function getQuery(): \Spameri\ElasticQuery\Query\QueryCollection { return $this->query; } }