Script field aggregation


(Paweł Róg) #1

I cannot find any information about this so I'm posting this topic. Is it possible to run terms, sum or avg aggregations on field which was created using script_fields feature?


(Adrien Grand) #2

Elasticsearch supports running aggregations on scripts, but beware that it has a significant performance impact, not only because scripts make things slow, but also because some optimizations are not available anymore (eg. ordinals on strings).

https://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-aggregations-bucket-terms-aggregation.html#search-aggregations-bucket-terms-aggregation-script


(Paweł Róg) #3

Thank you for information Adrien.


(system) #4