COMPOSITE NESTED AGGREGATIONS

Hi, i hope that someone can help me.

Supose that i have the following mapping to my index:

PUT test-index
{
  "mappings": {
    "properties": {
      "nestedOBJField": {
        "type": "nested",
        "index": true
      },
       "keywordField": {
        "type": "keyword",
        "index": true
      }
    }
  }
}

It is possible to use the composite feature with nested fields?

It will be very handful if i can do something like this:

GET /test-index/_search
{
  "size": 0, 
  "aggs": {
    "TestAgg": {
      "composite": {
        "size": 10000,
        "sources": [
          {
            "keyWordFieldAgg": {
              "terms": {
                "field": "keyWordField"
              }
            },
           {
            "nestedFieldAgg": {
              "terms": {
                "field": "nestedOBJField.attribute"
              }
            }
          }
        ]
      }
    }
  }
}

But this aproach is returning a several number of errors.

I will appreciate a lot if someone can help

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.