ElasticSearch currently has known limitations when using and manipulating aggregations.
Pipeline aggregations are run during the reduce phase after all other aggregations have already completed. For this reason, they cannot be used for ordering.
It means that we can't order our aggregations by
Bucket_Script_Aggregation, which is quite useful and powerful in any other BI engine (such as Create.io).
I want to know what are the best-practices for making such "processing" in the client-side. Would you make the processing in the browser itself (should I be afraid of "big" json responses)? Would you make a proxy server which makes the processing for the browser (although it might hurts the client flexibility)?