-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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] aggregation on nested field returns incorrect result #14347
Comments
Please correct me if my understanding here is wrong, but it looks like your agg is on the field Furthermore, when I try to do your
Given that I don't think there are any problems here then, could you please double check? |
Also, I think in order to interact with nested fields in an aggregation, a nested aggregation must be used. See: https://opensearch.org/docs/latest/aggregations/bucket/nested/ |
Thanks @kkewwei! I also took at look at this, I think the problem is the nested aggregation was not used in the original query. I'm going to close this issue for now, @LantaoJin please re-open if there's any other issues here, thanks! |
Describe the bug
Aggregation
value_count
on field ofnested
type returns incorrect result. This issue only happens onnested
type,object
type withoutnested
looks fine.Related component
Search:Aggregations
To Reproduce
Repro:
Expected behavior
value_count
should return 2 instead of 0Additional Details
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: