Histogram aggregation on calculated field by script

Hey everyone!

We have index with products and every product (document in index) has several prices fields. We have query with script that calculates us finalPrice field because we do not know how many prices a document could have in advance.

We'd like to create Histogram aggregation on final prices of our products. Is there any option we calculate final price inside the Histogram aggregation and use it as input for Histogram aggregation?

Any idea is appreciated!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.