mattbaird/elastigo — pull request #141 by nwolff (2014-11-30 09:44:49+00:00)
Title: When checking if a document or index exist, don't return an error when the document or index is absent

I think the exists methods should only return an error when something bad occurs. The fact that a document or index does not exist is expected and is reflected in the boolean return value false.

I also took a clue from the python official lib: https://github.com/elasticsearch/elasticsearch-py/blob/377dd12d12d640decc17d43ff83a469072f465ef/elasticsearch/client/__init__.py#L256-L279

I guess this may break existing clients that were expecting a RecordNotFound error, but I didn't want to create yet another Exist method (there is already a probably unused Exist method in baserequest) to keep backward compatibility.