Skip to content

Commit

Permalink
PLC4X-125 - Update the ElasticSearch example to a more recent Elastic…
Browse files Browse the repository at this point in the history
…Search version

- Updated the ElasticSearch example to the newest version (7.0.1)
  • Loading branch information
chrisdutz committed May 20, 2019
1 parent f832e53 commit 03d2469
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,8 @@ else if("eth0".equals(dev.getName())) {

private static class MyNode extends Node {
private MyNode(Settings preparedSettings, Collection<Class<? extends Plugin>> classpathPlugins) {
super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), classpathPlugins);
super(InternalSettingsPreparer.prepareEnvironment(
preparedSettings, Collections.emptyMap(), null, () -> "hello-es"), classpathPlugins, true);
}
}

Expand All @@ -1443,7 +1444,7 @@ private Node startElasticsearchNode() {
Node node = new MyNode(Settings.builder()
.put("transport.type", "netty4")
.put("http.type", "netty4")
.put("http.enabled", "true")
.put("http.cors.enabled", "true")
.put("path.home", "elasticsearch-data")
.build(), Collections.singletonList(Netty4Plugin.class));
node.start();
Expand Down

0 comments on commit 03d2469

Please sign in to comment.