Calls to ES throws exception if server not available

If elasticsearch server is not available or any other network error occurs. callback(error) should be called instead.