[OpenSearch] OpenSearch Query Workbench Return 0 with Sum() or Count() Aggregation Query

0

Hi, We are try to run some Aggregation Query ( SUM or COUNT ) in OpenSearch Query Workbench. When we run the following simple query:

Select resource.amount.value FROM <index_>* 
WHERE record_type = "<target_type>" 
AND creation_time >= '2024-05-01 03:30:00'

We are able to get the result in a column with non-zero numbers:

Enter image description here

However when we run query with sum(resource.amount.value), we get 0:

Enter image description here

Why the sum() query return 0 even it is able to get each value?

  • FYI, we use static mapping on our OpenSearch. And resource.amount.value is not inculcated in the mapping. However, if the query is able to get each value, then sum() should be working as well.

Frank
asked 4 months ago142 views
1 Answer
0

Hello,

Thank you for asking your question.

I would request you to please reach out to the AWS Premium Support team via a support case along with your domain arn and other details such as index mapping, index name and some sample data. So that the team can replicate this behavior at their end and resolve the issue for you.

We apologize for the inconvenience caused due to this.

AWS
SUPPORT ENGINEER
Aman_k
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions