Re: nested aggregation against key value pairs

2014-10-27 Thread Jay Hilden
Here is some sample data: PUT index1 PUT index1/type1/_mapping { type1: { properties: { kvp: { type: nested, properties: { key: { type: string }, value: { type: string } } } } } }

Re: nested aggregation against key value pairs

2014-10-27 Thread Adrien Grand
Hi Jay, Reindexing and having a key that combines the key and value fields would certainly be the fastest option. On Mon, Oct 27, 2014 at 1:52 PM, Jay Hilden jay.hil...@gmail.com wrote: Here is some sample data: PUT index1 PUT index1/type1/_mapping { type1: { properties: {

Re: nested aggregation against key value pairs

2014-10-27 Thread Jay Hilden
Thanks Adrien. On Mon, Oct 27, 2014 at 12:12 PM, Adrien Grand adrien.gr...@elasticsearch.com wrote: Hi Jay, Reindexing and having a key that combines the key and value fields would certainly be the fastest option. On Mon, Oct 27, 2014 at 1:52 PM, Jay Hilden jay.hil...@gmail.com wrote:

nested aggregation against key value pairs

2014-10-24 Thread Jay Hilden
I have an ES type with a nested KeyValuePair type. What I'm trying to do is a terms aggregation on both the key and value fields such that I'd get the following results: Key1 - Value1: DocCount = 10 Key1 - Value2: DocCount = 9 Key2 - Value3: DocCount = 4 Here is my mapping: { index123 : {

Re: nested aggregation against key value pairs

2014-10-24 Thread Zennet Wheatcroft
Have you tried the usual sub-aggregations? It looks like it should do exactly what you want. If so, why does that not work? Can you include some sample data and queries you have tried so that we can index it and try your queries? Bucketing aggregations can have sub-aggregations (bucketing or