# Use of setting path.data value?

**URL:** <https://discuss.elastic.co/t/use-of-setting-path-data-value/3745>\
**Category:** Elasticsearch\
**Created:** [January 5, 2011, 10:34am UTC](https://discuss.elastic.co/t/use-of-setting-path-data-value/3745 "2011-01-05T10:34:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cheepu](https://avatars.discourse-cdn.com/v4/letter/c/e9a140/32.png) [@cheepu](https://discuss.elastic.co/u/cheepu)\
**Post date:** [January 5, 2011, 10:34am UTC](https://discuss.elastic.co/t/use-of-setting-path-data-value/3745/1 "2011-01-05T10:34:18Z")

</div>

Hi  
I am using the following setting:  
Settings  
settings=ImmutableSettings.settingsBuilder()  
.put("index.number\_of\_shards",1)  
.put("path.logs","f:/mylogs")  
.put("path.data","f:/  
mydata")  
.build();  
Node node =  
NodeBuilder.nodeBuilder().settings(settings).node().start();

Thus my index is created in the f:/mydata and the ElasticHome  
directory.  
When i search the qyery it is found. If i delete the f:/mydata  
directory then also it searches the query.  
I could not understand the use of this. Why it is used ? If i seprate  
the index from the server directory completely then what I will have  
to do?

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:** [January 5, 2011, 12:30pm UTC](https://discuss.elastic.co/t/use-of-setting-path-data-value/3745/2 "2011-01-05T12:30:17Z")

</div>

Not sure I got the question. If you set the data path, then thats where the  
index will be stored. Are you suggesting that executing a search with a  
query when not setting the data path works, and if you set the data path, it  
stops working? Are you sure you have data in the index? Have you refreshed  
before you do the search to make sure you are searching on the freshest  
data?

On Wed, Jan 5, 2011 at 12:34 PM, Cheepu Jain [cheeputech@gmail.com](mailto:cheeputech@gmail.com) wrote:

> Hi  
> I am using the following setting:  
> Settings  
> settings=ImmutableSettings.settingsBuilder()  
> .put("index.number\_of\_shards",1)  
> .put("path.logs","f:/mylogs")  
> .put("path.data","f:/  
> mydata")  
> .build();  
> Node node =  
> NodeBuilder.nodeBuilder().settings(settings).node().start();
> 
> Thus my index is created in the f:/mydata and the ElasticHome  
> directory.  
> When i search the qyery it is found. If i delete the f:/mydata  
> directory then also it searches the query.  
> I could not understand the use of this. Why it is used ? If i seprate  
> the index from the server directory completely then what I will have  
> to do?
> 
> Thanks

---

<div class="post-metadata">

**Author:** ![cheepu](https://avatars.discourse-cdn.com/v4/letter/c/e9a140/32.png) [@cheepu](https://discuss.elastic.co/u/cheepu)\
**Post date:** [January 5, 2011, 12:43pm UTC](https://discuss.elastic.co/t/use-of-setting-path-data-value/3745/3 "2011-01-05T12:43:27Z")

</div>

I am getting the query results in both the cases.  
The data is created in both the location i) In the ES\_Home and ii) where i specified the location.  
but the searching is done from the data folder inside the server; because when I delete the folder delete the folder from the location path.data I get the hits.  
So what is the purpose to create the data in the other location using "path.data"?

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:** [January 5, 2011, 12:50pm UTC](https://discuss.elastic.co/t/use-of-setting-path-data-value/3745/4 "2011-01-05T12:50:57Z")

</div>

You might have hit this bug which is fixed in master:  
[Issues · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/closed#issue/579).

On Wed, Jan 5, 2011 at 2:43 PM, cheepu [cheeputech@gmail.com](mailto:cheeputech@gmail.com) wrote:

> I am getting the query results in both the cases.  
> The data is created in both the location i) In the ES\_Home and ii) where i  
> specified the location.  
> but the searching is done from the data folder inside the server; because  
> when I delete the folder delete the folder from the location path.data I  
> get  
> the hits.  
> So what is the purpose to create the data in the other location using  
> "path.data"?
> 
> Thanks
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/use-of-setting-path-data-value-tp2197758p2198351.html](http://elasticsearch-users.115913.n3.nabble.com/use-of-setting-path-data-value-tp2197758p2198351.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, 4:14am UTC](https://discuss.elastic.co/t/use-of-setting-path-data-value/3745/5 "2017-07-06T04:14:17Z")

</div>


