From 3f13f02575fd5157000c59ca2d7a707c0a74a861 Mon Sep 17 00:00:00 2001 From: Colin Goodheart-Smithe Date: Fri, 29 Jul 2016 14:24:58 +0100 Subject: [PATCH] [DOCS] updated documentation for transport client changes Updated dependency in Java API docs and added section in breaking changes --- docs/java-api/index.asciidoc | 4 ++-- .../migration/migrate_5_0/java.asciidoc | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/docs/java-api/index.asciidoc b/docs/java-api/index.asciidoc index fbd3fe33165..e49dd02a1e6 100644 --- a/docs/java-api/index.asciidoc +++ b/docs/java-api/index.asciidoc @@ -28,8 +28,8 @@ For example, you can define the latest version in your `pom.xml` file: [source,xml] -------------------------------------------------- - org.elasticsearch - elasticsearch + org.elasticsearch.client + transport ${es.version} -------------------------------------------------- diff --git a/docs/reference/migration/migrate_5_0/java.asciidoc b/docs/reference/migration/migrate_5_0/java.asciidoc index 7670f31c694..f691784e47f 100644 --- a/docs/reference/migration/migrate_5_0/java.asciidoc +++ b/docs/reference/migration/migrate_5_0/java.asciidoc @@ -4,6 +4,30 @@ [[breaking_50_java_api_changes]] === Java API changes +==== Transport client has been moved + +The Java transport client has been moved to its own module which can be referenced using: + +[source,xml] +----- + + org.elasticsearch.client + transport + 5.0.0-alpha5 + +----- + +The transport client is now created using the following snippet: + +[source,java] +----- +TransportClient client = new PreBuiltTransportClient(Settings.EMPTY) + .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("host1"), 9300)) + .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("host2"), 9300)); +----- + +For more information please see the {javaclient}java-api.html[Java client documentation] + ==== Count api has been removed The deprecated count api has been removed from the Java api, use the search api instead and set size to 0.