-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Return _parent value by default for child documents #8068
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
Comments
This should probably be expanded to cover other metadata fields:
|
👍 I've stumbled across the following case for one of our projects : we needed to retrieve the generated timestamp for indexed document. However, it currently forces us to make another request to the cluster only to retrieve this I'm not sure if return it by default is worthy of the extra cost. Maybe using a flag (as for version parameter) to tell ES to include it in the response could do the trick. However, it would be nice to have it included by default (if stored) when indexing a document for the first time. |
@tcucchietti you don't need a separate request for this value. Just add |
@clintongormley Sorry, my comment was maybe misleading. I was talking about adding it in the indexing request's answer. For example, this request : currently returns something like :
It would be nice to have this :
|
@tcucchietti Ah ok. Why do you need that? If you are wanting to set the timestamp to |
@clintongormley In our case, this is what was finally done and it works perfectly. As a user, it feeled a bit awkward to have to do this on the indexing side. It's just a personal feeling, that's why I proposed some flag or configuration to achieve this. Besides this, there could be cases where you need the exact timestamp of the document indexing in the cluster. For example, if you prepare a big bulk indexing request, setting the timestamp value while preparing it could lead to some (minor) difference between this preset value and the exact value of the indexing time. |
+1 for returning any stored fields that are not derived from the _source field |
Fixed by #11816 |
When you search or GET to retrieve documents you don't get back the value for
_parent
field (or_routing
for that matter) which is part of the essential metadata. Meaning the document cannot be retrieved or updated without the value. This is breaking some functionality, example use cases:scan
being fed intobulk
) cannot workI believe it would be worth the cost to retrieve the value of
_parent
field when retrieving a child document.The text was updated successfully, but these errors were encountered: