How can I see if there is an exception in the delete operation?

Is there a way to know when the deletion operation is failed? I don't see that the client delete operation throws any exception.
Does it make this operation via a REST call? cause it says in the documentation that there is no indication for a failure on that: The delete operation will always return the the above result, even if the document did not exists. This is done for performance reasons.

If the delete itself failed, then an error code will be returned and the
body of the response will include the failure. A delete on non existent
document will simply return and not throw an error.

-shay.banon

On Wed, Oct 6, 2010 at 5:15 PM, Shelly shelly.mahlab@hp.com wrote:

Is there a way to know when the deletion operation is failed? I don't see
that the client delete operation throws any exception.
Does it make this operation via a REST call? cause it says in the
documentation that there is no indication for a failure on that: The delete
operation will always return the the above result, even if the document did
not exists. This is done for performance reasons.

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/How-can-I-see-if-there-is-an-exception-in-the-delete-operation-tp1643144p1643144.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

What should be the indication in the response in case of a failure? from what I see there are there parameters on that response - id, index and type. Do any of them get a special value if it fails?

The HTTP response code will not be 200. The content of the body will include
an "error" with a description of the error (no index / type / id).

-shay.banon

On Wed, Oct 6, 2010 at 5:53 PM, Shelly shelly.mahlab@hp.com wrote:

What should be the indication in the response in case of a failure? from
what
I see there are there parameters on that response - id, index and type. Do
any of them get a special value if it fails?

View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/How-can-I-see-if-there-is-an-exception-in-the-delete-operation-tp1643144p1643426.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

but I don't see any api on DeleteResponse to get the http message. it on has getId, getIndex and getType api.

Are you talking about the Java API? If so, then an exception will be thrown.

On Thu, Oct 7, 2010 at 12:36 PM, Shelly shelly.mahlab@hp.com wrote:

but I don't see any api on DeleteResponse to get the http message. it on
has
getId, getIndex and getType api.

View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/How-can-I-see-if-there-is-an-exception-in-the-delete-operation-tp1643144p1647566.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

Is ther a way to know if the object we wanted to delete was not found? cause it doesn't throw any exception in that case.

No, this is what I was trying to explain in the previous emails. An
exception will not be thrown if the object is not there. You can try and get
it before and check if it exists, but be careful of the near real time
aspect of elasticsearch.

On Thu, Oct 7, 2010 at 1:59 PM, Shelly shelly.mahlab@hp.com wrote:

Is ther a way to know if the object we wanted to delete was not found?
cause
it doesn't throw any exception in that case.

View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/How-can-I-see-if-there-is-an-exception-in-the-delete-operation-tp1643144p1647944.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.