This time it works perfectly and it does exactly what I need.

Thanks a lot!
Jose.

On Friday, 2 May 2014 16:47:12 UTC+1, Adrien Grand wrote:
>
>
>
>
> On Fri, May 2, 2014 at 5:40 PM, Jose A. Garcia 
> <argan...@gmail.com<javascript:>
> > wrote:
>
>> Sorry to keep on with this, but if I do that I get an error:
>>
>> Parse Failure [Found two aggregation type definitions in 
>> [field1_top_terms]: [terms] and [field1_count]. Only one type is 
>> allowed.]
>>
>
> Oops, I fixed the outer aggregation, but not the inner one. This time I 
> tested the request to it should work (hopefully :)).
>
> GET /summary/row/_search
> {
>   "query": {
>     "match": {
>       "field3": 1
>     }
>   },
>   "aggs": {
>     "field1_top_terms": {
>       "terms": {
>         "field": "field1"
>       },
>       "aggs": {
>           "field1_count": {
>             "sum": {
>               "field": "count"
>             }
>           }
>       }
>     }
>   }
> }
>
> -- 
> Adrien Grand
>  

-- 
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 elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/4528c39b-3b2f-46cc-bb71-63f01d1c837b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to