If it fails on the primary shard, then a failure is returned. If it worked, and a replica failed, then that replica is deemed a failed replica, and will get allocated somewhere else in the cluster. Maybe an example of where a failure on "all" shards would help here?
On Jun 18, 2014, at 11:45, mooky <[email protected]> wrote: > If I understand correctly, we can get an OK response from elastic (ie no > error) but if there are shard failures in the response, it potentially means > that results are incomplete/incorrect. From my observation, we can get > failures on all shards - and elastic still returns OK (which was a bit > surprising to me) > > What kinds of approaches to people typically use to deal with shard failures? > > For my application, if there are shard failures, essentially my results are > inaccurate/incorrect - so I need to return an error to the client. Returning > bad results is worse than returning an error. > > I am inclined to turn any shard failure into an exception. > Is this quite common? Does it make sense to add a feature to the elastic api > ? (ie request.setTreatShardFailuresAsErrors(true) > > -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/461fa217-d664-47e9-a60d-88ea9506327d%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/FFDC7083-24CB-484D-B337-65582596D555%40gmail.com. For more options, visit https://groups.google.com/d/optout.
