Skip to content

Commit

Permalink
Update the example of the multiple terms aggregation by muliple order…
Browse files Browse the repository at this point in the history
…s. (#7039) (#7142)
  • Loading branch information
opensearch-trigger-bot[bot] authored May 14, 2024
1 parent 199a031 commit 72e7714
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions _aggregations/bucket/multi-terms.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ GET sample-index100/_search
},{
"field": "host"
}],
"order": {"max-cpu": "desc"}
"order": [{
"max-cpu": "desc"
},{
"max-memory": "desc"
}]
},
"aggs": {
"max-cpu": { "max": { "field": "cpu" } }
"max-cpu": { "max": { "field": "cpu" } },
"max-memory": { "max": { "field": "memory" } }
}
}
}
Expand Down Expand Up @@ -83,6 +88,23 @@ GET sample-index100/_search
"doc_count": 2,
"max-cpu": {
"value": 90.0
},
"max-memory": {
"value": 50.0
}
},
{
"key": [
"dub1",
"h1"
],
"key_as_string": "dub|h1",
"doc_count": 2,
"max-cpu": {
"value": 90.0
},
"max-memory": {
"value": 40.0
}
},
{
Expand All @@ -94,6 +116,9 @@ GET sample-index100/_search
"doc_count": 2,
"max-cpu": {
"value": 70.0
},
"max-memory": {
"value": 90.0
}
},
{
Expand All @@ -105,6 +130,9 @@ GET sample-index100/_search
"doc_count": 2,
"max-cpu": {
"value": 50.0
},
"max-memory": {
"value": 50.0
}
},
{
Expand All @@ -116,6 +144,9 @@ GET sample-index100/_search
"doc_count": 2,
"max-cpu": {
"value": 15.0
},
"max-memory": {
"value": 20.0
}
}
]
Expand Down

0 comments on commit 72e7714

Please sign in to comment.