We're running ElasticSearch 5.5.1.
Here's an end point that returns an expected response
http://:9200/index/indexType/AV3gv5yWc_QVZ8-roTdU/
Response:
{
"_index":"chemistry",
"_type":"layouts",
"_id":"AV3gv5yWc_QVZ8-roTdU",
"found":false
}
Would it be nice to have the same response when _source is added to the end point?
http://:9200/index/indexType/AV3gv5yWc_QVZ8-roTdU/_source
Instead the response is an exception:
javax.ws.rs.NotFoundException: HTTP 404 Not Found
at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1020)
at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:819)
at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:92)
at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:701)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
and so on...
It appears that the method that handles http://:9200/index/indexType/AV3gv5yWc_QVZ8-roTdU/_source doesn't handle the results right. It works well when a document matching that id is found but fails when found none. When searching by an ID "found":false is a valid return and it should be handled so. Throwing an exception appears to be wrong.
Any thoughts?