I am trying to do a sum bucket using pipeline aggregation path separator.
But sum bucket value is always zero. It doesn't even throw an error.
I don't have any zero values in my data.
can you provide a fully reproducible example including index creation, document indexing and the whole query and the exact elasticsearch version you are using? otherwise this will be hard to reproduce.
Thanks for the reply.
I am using AWS Elasticsearch ver 6.7
Documents are written to index when there is status change from various devices along with time. Mappings and index creation handled by elasticsearch defaults.
The query I have posted in the question is the exact query.
I expect the query to provide the sum_bucket aggreagation value as 2, summing up total aggregation field under the terms device2->SUCCESS and device3->SUCCESS
Use case: In a time series data, logging status from multiple devices, I want to get the latest status per device and count up the number of success devices. Exporting the latest status of all the devices and doing it on the client side is not an option.
That is why I decided to use sum_bucket and buckets_path syntax to select only SUCCESS results.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.