Skip to content

Commit

Permalink
[Docs] Replace InetSocketTransportAddress with TransportAdress (#30673)
Browse files Browse the repository at this point in the history
The former class has been removed in 6.0, the documentation code
snippets should be updated accordingly.
  • Loading branch information
Christoph Büscher committed May 17, 2018
1 parent 97fe111 commit c8b005b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/java-api/query-dsl/has-parent-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ When using the `has_parent` query it is important to use the `PreBuiltTransportC
--------------------------------------------------
Settings settings = Settings.builder().put("cluster.name", "elasticsearch").build();
TransportClient client = new PreBuiltTransportClient(settings);
client.addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress(InetAddresses.forString("127.0.0.1"), 9300)));
client.addTransportAddress(new TransportAddress(new InetSocketAddress(InetAddresses.forString("127.0.0.1"), 9300)));
--------------------------------------------------

Otherwise the parent-join module doesn't get loaded and the `has_parent` query can't be used from the transport client.
Expand Down
2 changes: 1 addition & 1 deletion docs/java-api/query-dsl/percolate-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ See:
--------------------------------------------------
Settings settings = Settings.builder().put("cluster.name", "elasticsearch").build();
TransportClient client = new PreBuiltTransportClient(settings);
client.addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress(InetAddresses.forString("127.0.0.1"), 9300)));
client.addTransportAddress(new TransportAddress(new InetSocketAddress(InetAddresses.forString("127.0.0.1"), 9300)));
--------------------------------------------------

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

0 comments on commit c8b005b

Please sign in to comment.