Is there any way to distinguish error messages in responses between errors
due to request error (eg wrong format etc) that will always be returned for
specified request and errors due to server problems. I need to know when
should I retry the request and when not. Eg, the response error due to
server error is 'UnavailableShardsException', and with such error I should
retry the request until success. The response error due to request problem
is eg 'SearchPhaseExecutionException' - here I should give up running this
request because it will never succeed.
This is probably much more kludgy that what you're looking for, but you
could use the validate API to ensure the request is valid:
On Friday, December 7, 2012 7:14:44 AM UTC-8, Marcin Dojwa wrote:
Hi,
Is there any way to distinguish error messages in responses between errors
due to request error (eg wrong format etc) that will always be returned for
specified request and errors due to server problems. I need to know when
should I retry the request and when not. Eg, the response error due to
server error is 'UnavailableShardsException', and with such error I should
retry the request until success. The response error due to request problem
is eg 'SearchPhaseExecutionException' - here I should give up running this
request because it will never succeed.
I guess I can use it if there is no other way, I will do the _validate
request on each response error to check if I should give up or retry the
request. Thanks Do you know how _validate works when I pass a request
that throws 'UnavailableShardsException'? Do I get "valid":true or '
UnavailableShardsException' error too ?
On Friday, December 7, 2012 7:14:44 AM UTC-8, Marcin Dojwa wrote:
Hi,
Is there any way to distinguish error messages in responses between
errors due to request error (eg wrong format etc) that will always be
returned for specified request and errors due to server problems. I need to
know when should I retry the request and when not. Eg, the response error
due to server error is 'UnavailableShardsException', and with such error I
should retry the request until success. The response error due to request
problem is eg '**SearchPhaseExecutionException' - here I should give up
running this request because it will never succeed.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.