adamfairholm / Elasticquent

Map Larvel Eloquent models to Elasticsearch types
MIT License
201 stars 38 forks source link

Undefined index: aggregations #18

Closed kiwo12345 closed 9 years ago

kiwo12345 commented 9 years ago

When I try to use search() I get the error: Undefined index: aggregations

Line 26 in /vendor/fairholm/elasticquent/src/ElasticquentResultCollection.php $this->aggregations = $results['aggregations'];

kiwo12345 commented 9 years ago

If I comment out "$this->aggregations = $results['aggregations'];" everything works.

Anyhow, I followed this tutorial: http://www.fullstackstanley.com/read/simple-search-with-laravel-and-elasticsearch

adamfairholm commented 9 years ago

Hi @kiwo12345 - have you pulled in the latest version? This should commit should have fixed this error:

https://github.com/adamfairholm/Elasticquent/commit/177914a2388a654dbdb53d91668249392b76c9f1

Artistan commented 9 years ago

still not accessible in composer, need to tag fix and update packagist?

timgws commented 9 years ago

@Artistan, yes.

You could switch to dev-master, or alternatively, take a look at https://github.com/elasticquent/Elasticquent, which is a fork of this repository that I have started maintaining.

adamfairholm commented 9 years ago

Hi @timgws - that fork looks great - I wonder if there is a smooth way to make that the official Elasticquent version instead of my version - I took a job shortly after releasing the initial version of this and just haven't haven't had the time to do any maintenance. I also like the elasticquent/elasticquent namespace.