Regarding elasticsearch data folder

Hi Team,

In my elasticsearch.yml, I have:

                index.number_of_shards: 3
                index.number_of_replicas: 1

I only have "0" named folder inside : /opt/elasticsearch/elasticsearch-2.3.3/data/index1/nodes

             [root@host nodes]# ls
              0
             [root@host nodes]#

What is this folder belongs to, and Is this indexing fine?

Thanks,

Gayathri

Hi Gayathri,

"0" is the id of your node in your cluster. If you only have a "0", it means you have a one node cluster. You should see an indices folder under "0", which should contain your different indices, and under each you will find the index shard data.

As long as you can get/search the data you've been indexing, then you're indexing fine :slight_smile:

Ohk, since Iam giving "index.number_of_shards" as "3", will it contain folders like "1" ,"2"

Thanks,

Gayathri

Yes, for each shard's data inside the indices directory.

So I have only "0" folder inside my data directory....What could be the issue?

I don't follow. You have 0 inside nodes probably because you only have one node. Under your indices folder (nodes/0/indices), you should see your index, then inside your index folder, you should see directories 0, 1, 2 and _state (since you have 3 primary shards and only one node that they are allocated on).

On looking at your original question, the index.* settings are index level settings, they don't belong in elasticsearch.yml but rather in the index settings or index templates, see: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html