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
Child query error when using _score
script in nested aggregation
#35985
Labels
Comments
This issue looks related: #28478 |
cbuescher
added
:Analytics/Aggregations
Aggregations
:Search/Search
Search-related issues that do not fall into other categories
:Core/Infra/Scripting
Scripting abstractions, Painless, and Mustache
labels
Nov 28, 2018
Pinging @elastic/es-analytics-geo |
Pinging @elastic/es-search |
Pinging @elastic/es-core-infra |
cbuescher
added
>bug
and removed
:Search/Search
Search-related issues that do not fall into other categories
labels
Nov 28, 2018
colings86
removed
the
:Core/Infra/Scripting
Scripting abstractions, Painless, and Mustache
label
Nov 28, 2018
jimczi
added a commit
to jimczi/elasticsearch
that referenced
this issue
Nov 28, 2018
The nested agg can defer the collection of children if it is nested under another aggregation. In such case accessing the score in the children aggregation throws an error because the scorer has already advanced to the next parent. This change fixes this error by caching the score of the parent in the nested aggregation. Children aggregations that work on nested documents will be able to access the _score. Also note that the _score in this case is always the parent's score, there is no way to retrieve the score of a nested docs in aggregations. Closes elastic#35985 Closes elastic#34555
jimczi
added a commit
that referenced
this issue
Nov 29, 2018
The nested agg can defer the collection of children if it is nested under another aggregation. In such case accessing the score in the children aggregation throws an error because the scorer has already advanced to the next parent. This change fixes this error by caching the score of the parent in the nested aggregation. Children aggregations that work on nested documents will be able to access the _score. Also note that the _score in this case is always the parent's score, there is no way to retrieve the score of a nested docs in aggregations. Closes #35985 Closes #34555
jimczi
added a commit
that referenced
this issue
Nov 29, 2018
The nested agg can defer the collection of children if it is nested under another aggregation. In such case accessing the score in the children aggregation throws an error because the scorer has already advanced to the next parent. This change fixes this error by caching the score of the parent in the nested aggregation. Children aggregations that work on nested documents will be able to access the _score. Also note that the _score in this case is always the parent's score, there is no way to retrieve the score of a nested docs in aggregations. Closes #35985 Closes #34555
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please see my self contained reproduction repository here.
I get an error when trying to run a query that seems reasonable to me. I'm able to avoid the error by setting size to 1.
Elasticsearch version:
6.4.2
,6.5.1
and7.0.0-alpha1
Plugins installed: None
JVM version: I'm running the official elastic docker image
OS version: I'm running the official elastic docker image
Description of the problem including expected versus actual behavior:
Steps to reproduce:
Please see my self contained reproduction repository here. It contains all the steps.
Here's the query used in the reproduction:
The error (
7.0.0-alpha1
):The text was updated successfully, but these errors were encountered: