-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] reverse nested context,while shifting from nested to root and root to nested path. #17109
Comments
@Shivacharangoud, reverse_nested considers one case, shifting from nested to root, but not including the root to nested again, in this case, the context will be new. Should we support this? please help evaluate. @msfroh |
@kkewwei Thank you for your response. I understand that reverse_nested works for shifting from nested to root but does not maintain the context when shifting back to nested. However, maintaining consistent context across such transitions is critical for accurate aggregations in cases like this. Is there any alternative solution or approach that could achieve the desired outcome. For instance, could a different query structure or using any other features of aggregations?. I feel it as a basic requirement. Looking forward to your thoughts or suggestions on how this could be resolved. Thank you! |
Sorry -- we're in the midst of the code freeze for OpenSearch 2.19 and my days are spent reviewing pull requests from across the OpenSearch community. I am not able to jump to attention at this time. Also, it's Chinese New Year, so I believe kkewwei is not working this week. |
Yes, It's at the end of the Chinese New Year. @Shivacharangoud, We need to use nested type to preserve a nested object, there seems no alternative solution. Maybe we can support reverse_nested with maintaining the context. if you have no time, I'd be pleasure to have a try. |
@kkewwei Thanks for the response! maintain context in reverse nested is a common use case, and having such support would make aggregations much more intuitive. |
Describe the bug
mapping:
Let's try to produce a report that gives number of hours by team by priority. Doing nested aggregation on teams.name and then reverse nested to group on priority and then nested to sum teams.hours double-counts hours because second nesting on teams knows nothing about upstream nesting as it is executed in context of request and as result it will lump hours for each team on request under the top level team aggregation. sum of hour under team is 10 and 20 but when we group again with priority( under each team ) and perform sum of hour its 30 means its considering two nested team objects. how to solve this issue?
Related component
Search:Aggregations
To Reproduce
mapping:
Expected behavior
expected result:
Additional Details
The text was updated successfully, but these errors were encountered: