# Java Elastic Search Index Location

**URL:** <https://discuss.elastic.co/t/java-elastic-search-index-location/7062>\
**Category:** Elasticsearch\
**Created:** [March 19, 2012, 5:43pm UTC](https://discuss.elastic.co/t/java-elastic-search-index-location/7062 "2012-03-19T17:43:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Satish1](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Satish1](https://discuss.elastic.co/u/Satish1)\
**Post date:** [March 19, 2012, 5:43pm UTC](https://discuss.elastic.co/t/java-elastic-search-index-location/7062/1 "2012-03-19T17:43:59Z")

</div>

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" folder, it still does search. So I have no clue where  
it is grabbing the indexed data after I have completely deleted  
"elasticSearch" folder. Any suggestions?

Thanks

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 20, 2012, 10:39am UTC](https://discuss.elastic.co/t/java-elastic-search-index-location/7062/2 "2012-03-20T10:39:23Z")

</div>

If you set path.home, then the data location is based on that by default (  
[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/setup/dir-layout.html)). Can  
you check if under "user.home"/elasticSearch you have more data  
(nodes/0/indices/...)?

On Mon, Mar 19, 2012 at 7:43 PM, Satish [satish.baniya@gmail.com](mailto:satish.baniya@gmail.com) wrote:

> 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" folder, it still does search. So I have no clue where  
> it is grabbing the indexed data after I have completely deleted  
> "elasticSearch" folder. Any suggestions?
> 
> Thanks

---

<div class="post-metadata">

**Author:** ![Satish1](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Satish1](https://discuss.elastic.co/u/Satish1)\
**Post date:** [March 20, 2012, 9:33pm UTC](https://discuss.elastic.co/t/java-elastic-search-index-location/7062/3 "2012-03-20T21:33:47Z")

</div>

Yes, I have more folders inside (nodes/0/indices...). This is how my  
folder structure under (nodes/0/indices...) as follows:  
-/nodes

- 
  - /0

- 
  - 
    - /indices

- 
  - 
    - 
      - /searchdata

- 
  - 
    - 
      - 
        - /0

- 
  - 
    - 
      - 
        - 
          - /index

- 
  - 
    - 
      - 
        - 
          - /translog

- 
  - 
    - 
      - 
        - /1

- 
  - 
    - 
      - 
        - 
          - /index

- 
  - 
    - 
      - 
        - 
          - /translog

Inside index and translog folders, I have few files.

Inside folder indices, I have folder searchdata.  
Inside folder searchdata, I have two folders, and they are folder 0  
and folder 1.  
Inside both folders 0 and 1, I have tow folders on each and they are  
folder index and folder translog.

I'm using elasticSerach-0.18.5 version. Do you think my version of  
Elasticsearch may be an issue?

Thanks

On Mar 20, 4:39 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> If you set path.home, then the data location is based on that by default ([Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/setup/dir-layout.html)). Can  
> you check if under "user.home"/elasticSearch you have more data  
> (nodes/0/indices/...)?
> 
> On Mon, Mar 19, 2012 at 7:43 PM, Satish [satish.ban...@gmail.com](mailto:satish.ban...@gmail.com) wrote:
> 
> > 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").no de();
> 
> > 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" folder, it still does search. So I have no clue where  
> > it is grabbing the indexed data after I have completely deleted  
> > "elasticSearch" folder. Any suggestions?
> 
> > Thanks

---

<div class="post-metadata">

**Author:** ![samCougars](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@samCougars](https://discuss.elastic.co/u/samCougars)\
**Post date:** [March 21, 2012, 9:14pm UTC](https://discuss.elastic.co/t/java-elastic-search-index-location/7062/4 "2012-03-21T21:14:15Z")

</div>

I have upgraded elasticSearch to 0.19.1 today and it seemed to fix the problem. Now if I remove the elasticsSearch folder, it is NOT doing search from "thin" air. Do you think a version might had a fix for my issue?  
Thanks,  
Satish

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 25, 2012, 10:21am UTC](https://discuss.elastic.co/t/java-elastic-search-index-location/7062/5 "2012-03-25T10:21:46Z")

</div>

No, there wasn't anything fixed in that area..., it feels like maybe you  
fixed something else while you were at it?

On Wed, Mar 21, 2012 at 11:14 PM, samCougars [sbaniya@gmail.com](mailto:sbaniya@gmail.com) wrote:

> I have upgraded elasticSearch to 0.19.1 today and it seemed to fix the  
> problem. Now if I remove the elasticsSearch folder, it is NOT doing search  
> from "thin" air. Do you think a version might had a fix for my issue?  
> Thanks,  
> Satish
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Java-Elastic-Search-Index-Location-tp3839752p3846871.html](http://elasticsearch-users.115913.n3.nabble.com/Java-Elastic-Search-Index-Location-tp3839752p3846871.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:34am UTC](https://discuss.elastic.co/t/java-elastic-search-index-location/7062/6 "2017-07-06T03:34:57Z")

</div>


