-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Access to child/parent fields of a document within a script #1017
Comments
i would like to see this implemented as well |
Would love to see this too. |
Thought this might already be possible. Was a bit confused with the docs. Put this stackoverflow post together: http://stackoverflow.com/questions/16474800/elasticsearch-has-child-filter-i-want-to-reference-child-fields-in-results Seems like the data is already there to build the existing query up. Why not make it available? Would love this feature since it would enable multi-type query integration into UI controls like facetview. |
+1 I would like that too |
+1 allowing scripts to load other docs by id would be a more usefull general solution here. |
+1 this would be awesome. |
👍 |
There is a discussion here that explains the issue in further detail. This should already be possible using a function score query. The parent / child field can be referenced within the function, but ES doesn't return the value as expected. This seems like a bug rather than a feature. |
After discussion, we've decided against this issue as looking up another doc from within a script would be prohibitively expensive. Potentially what you need will be solvable when aggregations have parent-child support. |
We have this use case - do aggregations have parent/child support now? Are there plans to add it, if not? I could see looking up children would be expensive because there could potentially be many but perhaps it would be possible to have this just for the parent since there can be one. |
Also - even if you gave access to the documents in the inner-hits query for scoring or post-filtering it would be great. You're already doing to the lookup for the other documents - you just can't do anything with them in a script (unless I'm missing something..) If you could, that by itself could be very helpful in many use cases. |
Similar to #761 where it is asked to join the parent and child within the search result.
It would be nice to have access to the child documents- (and/or the parent document-) 's fields to be able to perform some lookup and script scoring or create a script field.
Examples:
The text was updated successfully, but these errors were encountered: