Skip to content

Unable to aggregate on _index #5848

@berggren

Description

@berggren

When using the aggregations module I am unable to get aggregated doc counts per index.

The following query DO NOT return the aggregated result per index:

{
  "query": {
    "match_all": {}
  },
  "size": 0,
  "aggs": {
    "type": {
      "terms": {
        "field": "_index"
      }
    }
  }
}

When I use Facets instead of aggs, I get the desired result:

{
  "query": {
    "match_all": {}
  },
  "size": 0,
  "facets": {
    "type": {
      "terms": {
        "field": "_index"
      }
    }
  }
}

Is this a known issue?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions