I am trying to connect to a cluster on qbox the hosting service and I get an error relating to path. I am unsure how to specify the endpoint API. Has anyone any ideas?
public Map<String, Object> putJsonDocument(int partid, String partnumber){
Map<String, Object> jsonDocument = new HashMap<String, Object>();
jsonDocument.put("partid", partid);
jsonDocument.put("partnumber", partnumber);
return jsonDocument;
}
public void ESUpdate() {
org.elasticsearch.node.Node node = org.elasticsearch.node.NodeBuilder.nodeBuilder().node();
Client client = node.client();
client.prepareIndex("soogrindex", "searchrow", "1")
.setSource(putJsonDocument(1, "test55" )).execute().actionGet();
}
Exception in thread "main" java.lang.IllegalStateException: path.home is not configured
at org.elasticsearch.env.Environment.<init>(Environment.java:101)
at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:81)
at org.elasticsearch.node.Node.<init>(Node.java:128)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:152)
at com.example.GetSoogrSitemap.ESUpdate(GetSoogrSitemap.java:708)
at com.example.GetSoogrSitemap.main(GetSoogrSitemap.java:2056)