Hi,
I am new to Elasticsearch and I tried to connect elastic search client running in my local network , but I am getting index missing exception. Here is my code
NodeBuilder node = nodeBuilder();//.client(true).node();
node.settings().put("cluster.name", "CapdigiRA2");
node.settings().put("node.local", "false");
node.settings().put("discovery.zen.ping.unicast.hosts","192.168.65.1:9302");
Client clientNew = node.client(true).node().client();
CountRequest cr = new CountRequest("db2028") ;
cr.query(queryString("_currentstatus:x"));
ActionFuture af = clientNew.count(cr);
CountResponse cres = af.actionGet();
System.out.println(cres.count()) ;
Here is my node info
{
"cluster_name": "TEST",
"nodes": {
"1tlhBHXWTnyDh6C_ez9FpA": {
"name": "Crooked Man",
"transport_address": "inet[/192.168.65.1:9300]",
"attributes": {
"client": "true",
"data": "false"
},
"http_address": "inet[/192.168.65.1:9200]",
"os": {},
"process": {
"id": 2260
},
"jvm": {
"pid": 2260,
"vm_name": "Java HotSpot(TM) 64-Bit Server VM",
"vm_version": "16.0-b13",
"vm_vendor": "Sun Microsystems Inc.",
"start_time": 1293698827694
},
"network": {},
"thread_pool": {
"type": "cached",
"min_threads": 0,
"max_threads": -1,
"scheduler_threads": 20
},
"transport": {
"bound_address": "inet[/0.0.0.0:9300]",
"publish_address": "inet[/192.168.65.1:9300]"
}
},
"RjR1AtROQreajr24xTS1Qg": {
"name": "Captain Zero",
"transport_address": "inet[/192.168.65.1:9302]",
"attributes": {},
"http_address": "inet[/192.168.65.1:9202]",
"os": {
"cpu": {
"vendor": "Intel",
"model": "Xeon",
"mhz": 2400,
"total_cores": 8,
"total_sockets": 8,
"cores_per_socket": 1,
"cache_size": "-1b",
"cache_size_in_bytes": -1
},
"mem": {
"total": "15.9gb",
"total_in_bytes": 17168867328
},
"swap": {
"total": "19.3gb",
"total_in_bytes": 20825812992
}
},
"process": {
"id": 6340
},
"jvm": {
"pid": 6340,
"vm_name": "Java HotSpot(TM) Client VM",
"vm_version": "17.0-b16",
"vm_vendor": "Sun Microsystems Inc.",
"start_time": 1293698911095
},
"network": {
"primary_interface": {
"address": "192.168.0.141",
"name": "eth0",
"mac_address": "18:A9:05:63:8C:4A"
}
},
"thread_pool": {
"type": "cached",
"min_threads": 0,
"max_threads": -1,
"scheduler_threads": 20
},
"transport": {
"bound_address": "inet[/0.0.0.0:9302]",
"publish_address": "inet[/192.168.65.1:9302]"
}
},
"umfr8akMTtOwDCxmqr7IfQ": {
"name": "Jameson, J. Jonah",
"transport_address": "inet[/192.168.65.1:9301]",
"attributes": {
"client": "true",
"data": "false"
},
"http_address": "inet[/192.168.65.1:9201]",
"os": {},
"process": {
"id": 2260
},
"jvm": {
"pid": 2260,
"vm_name": "Java HotSpot(TM) 64-Bit Server VM",
"vm_version": "16.0-b13",
"vm_vendor": "Sun Microsystems Inc.",
"start_time": 1293698827694
},
"network": {
"primary_interface": {
"address": "",
"name": "",
"mac_address": ""
}
},
"thread_pool": {
"type": "cached",
"min_threads": 0,
"max_threads": -1,
"scheduler_threads": 20
},
"transport": {
"bound_address": "inet[/0.0.0.0:9301]",
"publish_address": "inet[/192.168.65.1:9301]"
}
}
}
}
Kindly help me. I think I am missing something. But not able to resolve.
Is there any sample code available to test this ?