GET /existing-index/_doc/notexisting-id/_source
returns empty body when document is not found.
Empty string is invalid json but content-type of response is application/json; charset=UTF-8
it whould be better if response body will be null to make json parser happy
elasticsearch version 6.4
Pinging @elastic/es-core-infra
@jasontedor marked this as "discuss", but I think this should be a bug. Empty body is not a valid return for the json content type (even if it's a 404). "null" sounds like a better choice here.
We discussed this in the core-infra team meeting and want to do the following:
I'd like to have a look at this one.
cURL recreation script created in this Gist.
I'd like to have a look at this one.
Enjoy!
PR is open, see https://github.com/elastic/elasticsearch/pull/34083.
I've built on top of the previous behavior. This means we don't make a difference when source is disabled or document is missing: in both cases a ResourceNotFoundException is raised with the same JSON message.
Do you think a difference should be made?