From 36a6211523e7b07eff5d6c64b0083a8df15c11ad Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Tue, 6 Oct 2015 16:23:43 -0400 Subject: [PATCH] [doc] Add a note about shard failure in the api Closes #13674 --- docs/reference/migration/migrate_2_0/java.asciidoc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/reference/migration/migrate_2_0/java.asciidoc b/docs/reference/migration/migrate_2_0/java.asciidoc index 9871df4e68d..65bfaef7bef 100644 --- a/docs/reference/migration/migrate_2_0/java.asciidoc +++ b/docs/reference/migration/migrate_2_0/java.asciidoc @@ -32,6 +32,13 @@ Settings settings = Settings.settingsBuilder() Client client = TransportClient.builder().settings(settings).build(); -------------------------------------------------- +==== Exception are only thrown on total failure + +Previously, many APIs would throw an exception if any shard failed to execute +the request. Now the exception is only thrown if all shards fail the request. +The responses for these APIs will always have a `getShardFailures` method that +you can and should check for failures. + ==== Automatically thread client listeners Previously, the user had to set request listener threads to `true` when on the @@ -109,7 +116,7 @@ new InetSocketTransportAddress(new InetSocketAddress("127.0.0.1", 0)); Elasticsearch used to shade its dependencies and to relocate packages. We no longer use shading or relocation. You might need to change your imports to the original package names: -* `com.google.common` was `org.elasticsearch.common` +* `com.google.common` was `org.elasticsearch.common` * `com.carrotsearch.hppc` was `org.elasticsearch.common.hppc` * `jsr166e` was `org.elasticsearch.common.util.concurrent.jsr166e` * `com.fasterxml.jackson` was `org.elasticsearch.common.jackson` @@ -121,4 +128,3 @@ You might need to change your imports to the original package names: * `com.tdunning.math.stats` was `org.elasticsearch.common.stats` * `org.apache.commons.lang` was `org.elasticsearch.common.lang` * `org.apache.commons.cli` was `org.elasticsearch.common.cli.commons` -