I'm using JAVA api for ES. I am creating index with this command:
client.prepareIndex("myEventSpecific", "myObject", "myID").setSource("myJsonText").execute().actionGet();
On my home directory, I see "searchdata" folder even I have specified to use "myEventSpecific". So I see both "myEventSpecific" and "searchdata" folders inside my indices folder. Do you know why it creates "searchdata" folder?
This is how my folder structure is:
1.myhomeDirectory/data/myEventSpecific/nodes/0/indices/myEventSpecific
2.myhomeDirectory/data/myEventSpecific/nodes/0/indices/searchdata
This is how my folder structure is:
1.myhomeDirectory/data/myEventSpecific/nodes/0/indices/myEventSpecific
2.myhomeDirectory/data/myEventSpecific/nodes/0/indices/searchdata
I've never seen a "searchdata" folder. If you delete it, is it
recreated?
I'm using JAVA api for ES. I am creating index with this command:
client.prepareIndex("myEventSpecific", "myObject",
"myID").setSource("myJsonText").execute().actionGet();
On my home directory, I see "searchdata" folder even I have specified to use
"myEventSpecific". So I see both "myEventSpecific" and "searchdata" folders
inside my indices folder. Do you know why it creates "searchdata" folder?
This is how my folder structure is:
1.myhomeDirectory/data/myEventSpecific/nodes/0/indices/myEventSpecific
2.myhomeDirectory/data/myEventSpecific/nodes/0/indices/searchdata
I'm creating a Node Client. First I create a node then get the client from node as follows:
Client client = null;
try{
ImmutableSettings.Builder settings = ImmutableSettings.settingsBuilder();
String eventSpecific = "myEventSpecific";
settings.put("path.home",System.getProperty("user.home")+"/elasticSearch"+eventSpecific);
settings.put("number_of_shards",1);
settings.put("number_of_replicas",0);
indexCreatingNode = NodeBuilder.nodeBuilder().settings(settings).clusterName(eventSpecific).node();
// start a node
indexCreatingNode.start();
// INDEX my required fields
// once all my fields are indexed then
client = indexCreatingNode.client();
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet();
I'm creating a Node Client. First I create a node then get the client from
node as follows:
Client client = null;
try{
ImmutableSettings.Builder settings =
ImmutableSettings.settingsBuilder();
String eventSpecific = "myEventSpecific";
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.