I'm jumping into the world of nested filter aggregations. Did you ever 
figure this out?

On Tuesday, January 21, 2014 3:15:11 PM UTC-5, John Freeman wrote:
>
> Bumping because I posted this on the weekend to few views. Should I file a 
> bug report?
>
> On Monday, January 20, 2014 3:55:54 PM UTC-5, John Freeman wrote:
>>
>> First, let me say I'm very excited about the new aggregations. Great work!
>>
>> I've got a type with two layers of nesting:
>>
>> script:
>>   calls: [
>>     name: string
>>     params: [
>>       name: string
>>       value: string
>>     ]
>>   ]
>>
>> I want to run an aggregation over the parameter values for calls to a 
>> specific function. Here's the skeleton of what I tried:
>>
>> 'aggs': {'b': {
>>   'nested': {'path': 'calls'},
>>   'aggs': {'c': {
>>     'filter': {'term': {'calls.name': 'particular_func'}},
>>     'aggs': {'d': {
>>         'nested': {'path': 'calls.params'},
>>         'aggs': ...
>>
>> The structure is three aggregations: a nested wrapping a filter wrapping 
>> a nested. Checking the doc counts on these, I see that the outer two work 
>> as expected: the doc count for the outer nested is the number of nested 
>> "calls" documents, the doc count for the filter is the number of those 
>> nested "calls" docs that pass the filter. But it appears that the inner 
>> nested resets the buckets: it returns the number of inner nested "params" 
>> documents across all "calls" docs, regardless of the filter.
>>
>> Is there a way to do what I want?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/50159e46-17b9-4ad3-9911-20cbcfe7eae4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to