Elasticsearch: add support for count
Closed this issue · 1 comments
killanch commented
We need to add support for count
API
Sample URL:
https://andcvtb03.an.nuagenetworks.net:6200/nuage_event/_count
Sample payload:
{
"query":{
"bool":{
"must":[
{
"term":{
"nuage_metadata.enterpriseName":"nsg-inc"
}
},
{
"range":{
"timestamp":{
"gte":"now-7d",
"lte":"now",
"format":"epoch_millis"
}
}
}
]
}
}
}
Sample response from elastic:
{
"count":7,
"_shards":{
"total":5,
"successful":5,
"skipped":0,
"failed":0
}
}
We need the following,
- ESService/ESRESTConnection changes to support count API
- User should be able to specify in config if count needs to be used
- ESTabify to return back count
cc @natabal