-
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] The comments did not match the codes in MultiTermsAggregationBuilder #13375
Comments
Thanks @Zhikai-VM, looks like a real issue. Do you think you could help with the updates? Make PRs? |
Hi @dblock, yes, I could update the comment in a PR, but could you please help to double-confirm the case?
Meanwhile, I think we also need to update the official document in: https://opensearch.org/docs/latest/aggregations/bucket/multi-terms/ |
I am not very familiar with this functionality, but I think we can work through this!
|
Hi @dblock , |
Describe the bug
In MultiTermsAggregationBuilder.java, the comments about multiple terms aggregation did not match codes:
The comment shows we can set up one order. But from the codes, it also supports an array like:
"order": [ {"max-cpu": "desc"} , {"max-memory": "desc"} ]
Here are the codes to parser this field:
PARSER.declareObjectArray(MultiTermsAggregationBuilder::order, (p, c) -> InternalOrder.Parser.parseOrderParam(p), ORDER_FIELD);
I also go through the codes and had some local tests. I think multiple orders do work. If so, could you please update the comment and the official document about this?
Related component
Search:Aggregations
To Reproduce
Compare the comments and codes.
Expected behavior
If multiple orders are supported, we should update the comments and the official document.
Additional Details
No response
The text was updated successfully, but these errors were encountered: