Skip to content
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

[DOC] Update the document for multiple terms aggregation #7037

Closed
1 of 4 tasks
Zhikai-VM opened this issue Apr 27, 2024 · 0 comments · Fixed by #7039
Closed
1 of 4 tasks

[DOC] Update the document for multiple terms aggregation #7037

Zhikai-VM opened this issue Apr 27, 2024 · 0 comments · Fixed by #7039
Assignees
Labels
2 - In progress Issue/PR: The issue or PR is in progress.

Comments

@Zhikai-VM
Copy link
Contributor

Zhikai-VM commented Apr 27, 2024

  • Request a change to existing documentation
  • Add new documentation
  • Report a technical problem with the documentation
  • Other

The current document about the multiple terms aggregation is not accurate. In the document(https://opensearch.org/docs/latest/aggregations/bucket/multi-terms/), it gives an example. And it implies that multiple terms aggregation only accepts one order. But in fact, it accepts multiple orders like the following:

GET sample-index100/_search
{
  "size": 0, 
  "aggs": {
    "hot": {
      "multi_terms": {
        "terms": [{
          "field": "region" 
        },{
          "field": "host" 
        }],
        "order":[ {"max-cpu": "desc"},  {"max-memory": "desc"}] <=== multiple orders
      },
      "aggs": {
        "max-cpu": { "max": { "field": "cpu" } },
        "max-memory":  { "max": { "field": "memory" } }
      }      
    }
  }
}

Please help to update the document, and I think this is an important and valuable feature for the multiple terms aggregation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - In progress Issue/PR: The issue or PR is in progress.
Projects
None yet
2 participants