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
Can't retrieve stored fields as part of inner hits #9766
Comments
The NPE sounds like a bug, because inner hits is expecting the source to be there. You should be able to use the |
@clintongormley yeah, I noticed the docs say you can use fields, but it doesn't tell you where to put the |
@tstibbs I referred to disabling the entire source and I think in your case you only leave out the nested part of your source. I see how this can result into the NPE you're describing. |
@martijnvg yep, I noticed that, just thought I'd report the NPE as it's presumably a bug (though a pretty minor one). My original point about not being able to retrieve stored fields (e.g. if you disable the entire source) is still valid though I think. |
This also fixes a NPE when the nested part has been filtered out of the _source, because of _source filtering. Closes elastic#9766
This also fixes a NPE when the nested part has been filtered out of the _source, because of _source filtering. Closes elastic#9766
This also fixes a NPE when the nested part has been filtered out of the _source, because of _source filtering. Closes #9766
This also fixes a NPE when the nested part has been filtered out of the _source, because of _source filtering. Closes elastic#9766
I've been trying out the new 'inner_hits' stuff (see #8153, I built a 1.5 snapshot from commit 23ef4e8 on the 1.x branch).
However, I don't seem to be able to request stored fields from my nested documents. It would be great to be able to specify a 'fields' element as part of the nested hit.
Note that Martijn's comment in #8153 (comment) suggested it is possible, but I couldn't work out how...
As a side note, that comment was suggested in relation to disabling the source. In my case I was trying to disable the source for just the nested children, by adding the following to my mapping:
which resulted in a null pointer exception...
The text was updated successfully, but these errors were encountered: