Hi,
If I am not wrong it's not possible yet to use the result of an aggregation
in another one.
You have to do that outside elasticsearch.
Regards,
Rémi
Le vendredi 11 juillet 2014 02:39:16 UTC+2, Greg Day a écrit :
>
> Hi guys
>
> Im wondering if it is possible to use the results of an aggregation in a
> aggregation calculation?
> eg: How would I calculate stocktosales in the example below?
>
> ....
> "aggregations": {
> "product": {
> "aggregations": {
> "sales": {
> "sum": {
> "field": "Sale"
> }
> },
> "onhand": {
> "avg": {
> "field": "Onhand"
> }
> },
> "*stocktosales*" : {
> * should be onhand/sales*
> }
> }
> }
> }
>
> Thanks!
>
> Greg
>
> Watch the fun new 2 minute and 2 second video tour of Vend
> <http://youtu.be/zh2X8FyKyMI>
--
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/0e701b9f-068d-4410-8eaf-51903bc08b2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.