Re: Sub-aggregations not working as expected

2014-04-11 Thread chris Hahn
Thanks for the reply, Parent child did return the desired results. I probably won't go this route because I am hoping to accomplish more join-like functions, but I did want to reply and let you know your advice was correct. Chris On Monday, April 7, 2014 1:46:05 AM UTC-5, Paweł Młynarczyk wrot

Re: Sub-aggregations not working as expected

2014-04-06 Thread Paweł Młynarczyk
Hello Chris ElasticSearch does not recognize your 'recipe' list as a list of logically connected fields. So when your top level aggregation returns i.e. rock, your sub-aggregation does not count stats based on the rock material, but based on all the materials that are included in the documents

Sub-aggregations not working as expected

2014-04-06 Thread chris Hahn
Playing with elasticsearch for a project. This is sample data, every document will have a list of ingredients, some of the ingredients may be used in different documents and in different quantities. I would like an aggregation that lists all ingredients for a search, and the stats of each ingre