Closed jcdarwin closed 9 years ago
Great work -- I've started using Elasticquent over the last day, and it works very nicely.
However, one issue I have is that ElasticquentResultCollection.php always expects aggregations to be returned from a search (line 26).
Most of the queries I'm doing at the moment don't need aggregations, and in order to prevent it throwing an error, I've had to change:
$this->aggregations = $results['aggregations'];
to:
$this->aggregations = isset($results['aggregations']) ? $results['aggregations'] : array();
Thanks @jcdarwin! Feel free to send a pull request today but I'll add it in later tonight.
Great work -- I've started using Elasticquent over the last day, and it works very nicely.
However, one issue I have is that ElasticquentResultCollection.php always expects aggregations to be returned from a search (line 26).
Most of the queries I'm doing at the moment don't need aggregations, and in order to prevent it throwing an error, I've had to change:
to: