Re: Aggregations: Possible to return additional fields?

2014-09-17 Thread vineeth mohan
Hello James , You can try the following 1. Make the tags field nested 2. Do a 2 level aggregation with nested/term type aggregation on id attribute over name term aggregation. This way you will get all ids and the names associated with it. Thanks Vineeth On Thu, Sep 18,

Aggregations: Possible to return additional fields?

2014-09-17 Thread James Addison
Is it possible to do a terms aggregation on a 'tags.id' field but also get back the associated 'tags.slug' and 'tags.name' fields? Here's how the documents are structured: { "id: 42, "name": Beer, "tags: [{ "id": 2, "name": "Hoppy", "slug": "hoppy" }, {