TOOL ยป ELASTICSEARCH

Composite aggregation

shell
curl -X GET "http://localhost:9200/my-index-000001/_search?pretty" -H 'Content-Type: application/json' -d "${JSON}"
json
{
  "aggs": {
    "item_count": {
      "composite": {
        "size": 100,
        "sources": [
          {
            "nameIdentifier": {
              "terms": {
                "field": "tag.keyword"
              }
            }
          }
        ]
      }
    }
  }
}