When will a CardinalityAggregationBuilder Aggregation type be supported in Rollup?

Any idea when CardinalityAggregationBuilder will be supported in Rollups? This query doesn't work against a rolled up index.

Query:

{
  "size": 0,
  "query": {
    "bool": {
      "must": [
        {
          "range": {
            "@timestamp": {
              "gte": "2018-03-01",
              "lte": "2018-03-10T23:59:59.999Z"
            }
          }
        },
        { "term": { "account": "27937601" } }
      ]
    }
  },
  "aggs": {
    "total_bytes": { "sum": { "field": "bytes" } },
    "streams": {
      "terms": {
        "field": "stream",
        "order": { "bytes_sum": "desc" },
        "size": 20
      },
      "aggs": {
        "bytes_sum": { "sum": { "field": "bytes" } },
        "distinct_ips": { "cardinality": { "field": "clientip_n_agent" } }
      }
    }
  }
}

Error:

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Unable to translate aggregation tree into Rollup.  Aggregation [distinct_ips] is of type [CardinalityAggregationBuilder] which is currently unsupported."
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "Unable to translate aggregation tree into Rollup.  Aggregation [distinct_ips] is of type [CardinalityAggregationBuilder] which is currently unsupported."
  },
  "status": 400
}

Unsure, there are some technical challenges which make it a longer project to support than other metrics. I'll be meaning to open a ticket to track progress on Cardinality/Percentiles... will update the thread in a little bit with a link to the issue.

We definitely want to support it (e.g. it's on the roadmap), but we're not sure when it will be implemented.

Just made an issue to track this: https://github.com/elastic/elasticsearch/issues/33214

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