-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Composite aggregation ignores value script in terms source #53135
Comments
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
I debugged this to learn a bit about the implementation of aggs. #53232 contains what I found out and also has a quick-fix for it. |
@hendrikmuhs I've run into field+script issues before, such as #43390. Pulling the entire content into the script will work reliably:
|
@bczifra Thanks. yes using doc works, I should have mentioned this for readers of the issue. I will update the entry post. |
closing as not planned. |
Using a terms source in a composite aggregation is documented to fully support scripts in the same way as terms aggregation:
However, value script does not work as expected but is silently ignored.
Workaround
Instead of using
_value
usedoc[{field_name}]
Reproduction
The described behavior can be reproduced using the kibana sample data logs:
returns e.g.
while the expected output is:
I am not sure if this is really a bug or a technical limitation. If its a limitation the documentation should not claim full support and the search request using a value script should error.
The text was updated successfully, but these errors were encountered: