nuagenetworks/js-bambou

Elasticsearch: add support for count

Closed this issue · 1 comments

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,

  1. ESService/ESRESTConnection changes to support count API
  2. User should be able to specify in config if count needs to be used
  3. ESTabify to return back count

cc @natabal

@natabal

This issue has been fixed. So I have closed this issue.