Embedded ElasticSearch On JAVA API Index Location


(samCougars) #1

This is how I'm doing in java api:
ImmutableSettings.Builder settings = ImmutableSettings.settingsBuilder();
settings.put("path.home",System.getProperty("user.home")+"/elasticSearch");
settings.put("number_of_shards",1);
settings.put("number_of_replicas",0);
Node node = NodeBuilder.nodeBuilder().settings(settings).clusterName("firstCluster").node();

Client client = node.client();
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet();

client.prepareIndex("searchdata", "exhibitor", "9999").setSource("My data information").execute().actionGet();

When I use this to create node and index, it creates the folder "elasticSearch" under my home directory. But even after I remove "elasticSearch", it still does search. So I have no clue where it is grabbing the indexed data after I have completely deleted "elasticSearch". Any suggestions?
Thanks


(system) #2