How can I convert this Elastic search query into nest query. the query is given Bellow . GET winlogbeat-6.6.0*/_search?size=0
{
"query": {
"match_all": {}
},
"aggs": {
"success ": {
"filter": {
"term": {
"event_id": 4624
}
}
},
"failed": {
"filter": {
"term": {
"event_id": 4625
}
}
}
}
}
The desired out Output in Kibana is as follow
{
"took" : 13120,
"timed_out" : false,
"_shards" : {
"total" : 37,
"successful" : 37,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 299924794,
"max_score" : 0.0,
"hits" : [ ]
},
"aggregations" : {
"failed" : {
"doc_count" : 351643
},
"success " : {
"doc_count" : 40375274
}
}
}
this is my code and i need to convert it NEST to get the desired result . Thanks