Skip to content

Commit 712473b

Browse files
author
Christoph Büscher
authored
[Docs] Replace InetSocketTransportAddress with TransportAdress (#30673)
The former class has been removed in 6.0, the documentation code snippets should be updated accordingly.
1 parent ef0daee commit 712473b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/java-api/query-dsl/has-parent-query.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ When using the `has_parent` query it is important to use the `PreBuiltTransportC
99
--------------------------------------------------
1010
Settings settings = Settings.builder().put("cluster.name", "elasticsearch").build();
1111
TransportClient client = new PreBuiltTransportClient(settings);
12-
client.addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress(InetAddresses.forString("127.0.0.1"), 9300)));
12+
client.addTransportAddress(new TransportAddress(new InetSocketAddress(InetAddresses.forString("127.0.0.1"), 9300)));
1313
--------------------------------------------------
1414

1515
Otherwise the parent-join module doesn't get loaded and the `has_parent` query can't be used from the transport client.

docs/java-api/query-dsl/percolate-query.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ See:
99
--------------------------------------------------
1010
Settings settings = Settings.builder().put("cluster.name", "elasticsearch").build();
1111
TransportClient client = new PreBuiltTransportClient(settings);
12-
client.addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress(InetAddresses.forString("127.0.0.1"), 9300)));
12+
client.addTransportAddress(new TransportAddress(new InetSocketAddress(InetAddresses.forString("127.0.0.1"), 9300)));
1313
--------------------------------------------------
1414

1515
Before the `percolate` query can be used an `percolator` mapping should be added and

x-pack/docs/en/watcher/java.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ TransportClient client = new PreBuiltXPackTransportClient(Settings.builder()
9595
.put("cluster.name", "myClusterName")
9696
...
9797
.build())
98-
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), 9300));
98+
.addTransportAddress(new TransportAddress(InetAddress.getByName("localhost"), 9300));
9999
100100
XPackClient xpackClient = new XPackClient(client);
101101
WatcherClient watcherClient = xpackClient.watcher();

0 commit comments

Comments
 (0)