-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
NPE when using expression script aggregation in multi level aggregations #26611
Comments
@sherry-ger This does not reproduce for me. I have tried with and without xpack, using your example requests, on 5.5, 5.6 and master. Is there something else about your setup that may be relevant? |
I was finally able to reproduce this, and it is due to a null Scorer being passed into painless from aggregations. @jpountz Can you or someone that knows aggs take a look? Also note this does not reproduce on 6.0 or master. |
Thanks @rjernst for digging into this. I'll work on a fix. |
This issue occurs only when terms aggs are executed in
Although the bug doesn't manifest in 6.0 and later, I think we should apply this fix on master, 6.x and 6.0 branches too. |
@martijnvg I agree with all your points, we should not be trying to pass down a scorer if no scorer has been set. I also agree that the fix should be applied to 6.0 6.x and master branches too. |
Thanks @colings86. I'll open a PR. |
Thanks @martijnvg ! |
Elasticsearch version (
bin/elasticsearch --version
):5.5.3
Plugins installed: []
x-pack
Steps to reproduce:
Note: If the script type were painless, the aggregation works fine.
Provide logs (if relevant):
npe.txt
The text was updated successfully, but these errors were encountered: