Versions
opensearch-rest-client: 2.4.0
opensearch-java: 2.1.0
Describe the issue:
I just want to know how I can implement a nested aggregation to add it to a search query using the opensearch-java client classes. Below there is an example of what I want to do:
{
"aggs": {
"2": {
"terms": {
"field": "bytes",
"order": {
"_count": "desc"
},
"size": 5
},
"aggs": {
"3": {
"terms": {
"field": "machine.ram",
"order": {
"_count": "desc"
},
"size": 5
}
}
}
}
}
I just want to someone explain the way to translate the request above to the opensearch java client way.