Skip to content
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

inner_hits empty if null objects exist in path #16582

Closed
abulhol opened this issue Feb 10, 2016 · 1 comment
Closed

inner_hits empty if null objects exist in path #16582

abulhol opened this issue Feb 10, 2016 · 1 comment

Comments

@abulhol
Copy link

abulhol commented Feb 10, 2016

I use top level inner hits to retrieve data from multiple nested documents.
Elasticsearch returns empty inner hits arrays for some of the hits, which is probably due to the existence of null objects inside the nested documents.
Please see a detailed description of the problem in this forum entry:
https://discuss.elastic.co/t/nested-query-missing-inner-hits/41038
I have looked at these documents with jq like this:
jq .a.b.c.d.first[].e.f.second[].message<json>
and the output is e.g. like this:

"Some message"
"Some other message"
jq: error: Cannot iterate over null

So I believe Elasticsearch iterates over the nested documents in a similar way and returns null if any of the nested objects is null (?).
I guess the ES code needs to be fixed then?

@abulhol
Copy link
Author

abulhol commented Feb 12, 2016

I found out that this is not really the reason for my problem, see the update in the forum issue I wrote. It has to do with the complex syntax for inner hits that I did not fully understand.
See also:
#13064
and this one:
#16143 (comment)

@abulhol abulhol closed this as completed Feb 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant