Getting average aggregation in java

has anyone gotten average aggregation in java? how do you use the api to
create the aggregation request? it is quite confusing..

i want to do the following in java -
"aggregations" : { "avg_grade" : { "avg" : { "field" : "score" }}}

thanks

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHau4yug%3Dep6%3DFs6m8%2B8ME1uv09N9ua%3DZUdsQxWp8TG2_02k-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Have a look here https://github.com/dadoonet/legacy-search/blob/06-compute/src/main/java/fr/pilato/demo/legacysearch/dao/ElasticsearchDao.java#L37

Should help.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 13 mai 2014 à 22:21, T Vinod Gupta tvinod@readypulse.com a écrit :

has anyone gotten average aggregation in java? how do you use the api to create the aggregation request? it is quite confusing..

i want to do the following in java -
"aggregations" : { "avg_grade" : { "avg" : { "field" : "score" }}}

thanks

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHau4yug%3Dep6%3DFs6m8%2B8ME1uv09N9ua%3DZUdsQxWp8TG2_02k-w%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/D3079468-9639-4526-93BF-16EE195F94C4%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

thanks!

On Tue, May 13, 2014 at 1:32 PM, David Pilato david@pilato.fr wrote:

Have a look here
https://github.com/dadoonet/legacy-search/blob/06-compute/src/main/java/fr/pilato/demo/legacysearch/dao/ElasticsearchDao.java#L37

Should help.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 13 mai 2014 à 22:21, T Vinod Gupta tvinod@readypulse.com a écrit :

has anyone gotten average aggregation in java? how do you use the api to
create the aggregation request? it is quite confusing..

i want to do the following in java -
"aggregations" : { "avg_grade" : { "avg" : { "field" : "score" }}}

thanks

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAHau4yug%3Dep6%3DFs6m8%2B8ME1uv09N9ua%3DZUdsQxWp8TG2_02k-w%40mail.gmail.comhttps://groups.google.com/d/msgid/elasticsearch/CAHau4yug%3Dep6%3DFs6m8%2B8ME1uv09N9ua%3DZUdsQxWp8TG2_02k-w%40mail.gmail.com?utm_medium=email&utm_source=footer
.
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/D3079468-9639-4526-93BF-16EE195F94C4%40pilato.frhttps://groups.google.com/d/msgid/elasticsearch/D3079468-9639-4526-93BF-16EE195F94C4%40pilato.fr?utm_medium=email&utm_source=footer
.
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHau4yvX4fWfOgbfD-7g9MByanvqc%3DJOdA2HLvb%2BUW-BhmL3FQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.