Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to aggregate on _tier metadata #126295

Open
klacabane opened this issue Apr 4, 2025 · 1 comment
Open

Ability to aggregate on _tier metadata #126295

klacabane opened this issue Apr 4, 2025 · 1 comment
Labels
:Analytics/Aggregations Aggregations >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@klacabane
Copy link
Contributor

klacabane commented Apr 4, 2025

Description

Terms aggregation on _tier metadata field results in an error. It is not clear whether this is intended behavior or a bug, but I'd expect this to work since a similar aggregation on _index metadata succeeds.

Use case

The kibana streams plugin shows a graph displaying document counts per tier for data streams managed by an ILM policy.
We currently query the document count per _index and cross that data with _ilm/explain. Aggregating on _tier would simplify the approach.

Issue

POST logs/_search
{
  "track_total_hits": false,
  "size": 0,
  "aggs": {
    "tiers": {
      "terms": {
        "field": "_tier"
      }
    }
  }
}

--->
...
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Fielddata is not supported on field [_tier] of type [_tier]"
      }
    ],
...
}
@klacabane klacabane added >enhancement needs:triage Requires assignment of a team area label labels Apr 4, 2025
@jbaiera jbaiera added :Analytics/Aggregations Aggregations and removed needs:triage Requires assignment of a team area label labels Apr 4, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Apr 4, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

No branches or pull requests

3 participants