May be a full SENSE example as a GIST would help understand what you are doing?
Age is a String?

David

> Le 8 déc. 2014 à 02:00, Mengjiqi Fisnik <[email protected]> a 
> écrit :
> 
> Define average age of the users with name "Jone"
> 
> {
>     
>             "query" : {
>                               "match" : { "name" : "Jone" }
>               },
> 
> 
>             "aggs" : {
>                 "avg_age" : { "avg" : { "field" : "age" } }
>             }    
>     
> }
> 
> This request hits all item with names Jone, but do not calculate average.  
> Aggregation avg display 0.
> 
> -- 
> 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/46076a0f-daf1-4373-8f3f-94d67dc82d53%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/10BB0898-865B-4192-B42C-F27DD5EAB42D%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to