I use Cardinality Aggregation in a query. Is it possible modify the query such that the response also contains the sum of those counts?
Hi @luka,
the cardinality aggregation is a single-value aggregation, i.e. it produces only a single value. What do you want to sum up? Can you show a concrete example?
Nevertheless, if you want to sum the results of an aggregation, you can use the sum bucket pipeline aggregation.
Daniel
The aggregation was only the last one in a series of nested aggregations, so your guessed my case correctly. Thank you!
ps I am still at version 1.7 and didn't know about pipelines.
Hi Luka,
Oh, I assumed you were at least on 2.x. Note that pipeline aggregations have been added in Elasticsearch 2.0, so unfortunately, you cannot use them.
Daniel