_terms_enum when using alias indices #107114
Labels
>enhancement
:Search/Search
Search-related issues that do not fall into other categories
Team:Search
Meta label for search team
Elasticsearch Version
8.12
Installed Plugins
No response
Java Version
bundled
OS Version
darwin_x86_64
Problem Description
I'm ingesting two datasets on a datastream called
metrics-apm*
, the only difference is on theservice.environment
field, where there are two options 'dev' or 'production'.I then create an alias where I split the data based on the environment:
I confirmed that only dev environment documents are available on the alias index by running a terms agg on the
service.environment
field:But when we call the _terms_enum api using the alias index as target, both environments are returned:
Result:
Shouldn't the terms enum API exclusively return the dev environment? Given that the target index is an alias and the dev environment is the only one associated with this alias, it seems logical to restrict the API response to just that
Related to: elastic/kibana#180065
Steps to Reproduce
I gave the steps on the problem description.
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: