Why I do not receive after_key from my composite aggregation query?

Elastic search Version: 6.2.4.

My query

{
  "aggs": {
    "composite_agg": {
      "aggs": {
        "ActDate": {
          "max": {
            "field": "details.details.ActDate",
            "format": "yyyy'-'MM'-'dd'T'HH':'mm':'ss.SSSSSSSZZ"
          }
        }
      },
      "composite": {
        "size": 2,
        "sources": [
          {
            "OrgId": {
              "terms": {
                "field": "details.details.OrgId"
              }
            }
          }
        ]
      }
    }
  }
}

result

"aggregations": {
    "composite_agg": {
      "buckets": [
        {
          "key": {
            "OrgId": 16777217
          },
          "doc_count": 40,
          "ActDate": {
            "value": 1554408754291,
            "value_as_string": "2019-04-04T20:12:34.2910000+00:00"
          }
        },
        {
          "key": {
            "OrgId": 16777218
          },
          "doc_count": 1,
          "ActDate": {
            "value": 1554402199081,
            "value_as_string": "2019-04-04T18:23:19.0810000+00:00"
          }
        }
      ]
    }
  }

Why I do not receive after_key to get more items. There are more items than I got in my query and this I see if I increase the size parameter.

This functionality will work on 6.3.* or later version. Please check 6.2.* manual https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-bucket-composite-aggregation.html

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