Seddryck / NBi.Elasticsearch

Extension for NBi to connect to an Elasticsearch instance and execute tests defined within NBi on it (including queries written with Query DSL provided by Elasticsearch)
Apache License 2.0
1 stars 0 forks source link

Support results from aggregations #3

Closed Seddryck closed 6 years ago

Seddryck commented 6 years ago

NBi should be able to execute and understands the result from an aggregation

GET /bank/_search
{
  "size": 0,
  "aggs": {
    "group_by_state": {
      "terms": {
        "field": "state.keyword",
        "size" : 3,
        "order": {
          "average_balance": "desc"
        }
      },
      "aggs": {
        "average_balance": {
          "avg": {
            "field": "balance"
          }
        }
      }
    }
  }
}