public function __construct(array $results)
{
$this->took = $results['took'];
$this->timed_out = $results['timed_out'];
$this->shards = $results['_shards'];
$this->hits = new Collection($results['hits']['hits']);
$this->totalHits = $results['hits']['total'];
$this->maxScore = $results['hits']['max_score'];
$this->aggregations = isset($results['aggregations']) ? $results['aggregations'] : [];
}