Is it possible to run custom "aggregations" directly db side?
I know there are builtin functionalities like averaging etc.
But I want to run a custom function on the data that is stored in a specific index.
Can you be more specific and explain your problem in more detail?
You could always write your own aggregation implementation if you wanted, but maybe your issue can be solved in an easier way. Also you may want to take a look at differnet aggregations who have scripting support and might help you to become more dynamic.
Hi Alexander,
I am intersted in knowing custom aggregation implementation steps.
Can you please elaborate.
Thanks.
R
Well let's say I have multiple parameter values (id: string, timestamp: date, value:number) per index and I want to calculate something out of that directly on db side, ideally supporting any parameters.
have you seen the script
support in many aggregations? See https://www.elastic.co/guide/en/elasticsearch/reference/7.8/search-aggregations-bucket-terms-aggregation.html#search-aggregations-bucket-terms-aggregation-script as an example for the terms agg (same applies for histogram as well).
okay thats useful.
The terms
aggregation does not support collecting terms from multiple fields in the same document.
Where can I look up all possibilities I have using scripts?
Is it even possible to perform calculations that need fields from other documents in the same index?
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.