java - Elaticsearch Transport Client: Why did a delete fail? -


i using transport client elasticsearch version 2.3. can't figure out how tell if delete failed because of error condition or because document not exist.

 deleteresponse deleteresponse = transportclient.preparedelete("indexname", "type", idtodelete).execute().get();  boolean isfound = deleteresponse.isfound(); 

i can tell when isfound true document deleted. if not deleted, how tell why? have failed because:

  1. the document didn't exist
  2. the elasticsearch server down
  3. the index or type not exist.
  4. some sort of network communication problem.

i need handle these scenarios distinctly.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -