Elasticsearch indices in data folder


(LuciferHBP) #1

Hi,
It would be great if someone could help!!
I am facing following problem with elasticsearch 5.1.1 :

I have downloaded elasticsearch 5.1.1 and whenever i am creating any index ,it is getting stored in elasticsearch data folder with uid instead of index name that i am providing (i.e. if i have giving index name as"index1" it is getting stored as "9JVFYLM3Q8Oh26gJfPxJVg" (which is its uid )in elasticsearch data folder !!!!

Thanks


(Christian Dahlqvist) #2

Why is this a problem? What is it you are trying to do?


(LuciferHBP) #3

Thanks for the reply!!,

Actually i am just parsing & creating index .. But what i am getting in data folder is indexed data but its name is coming as its uid.

When i try to create index in kibana (ex: with name "index1") its getting created successfully with all the data. But what i see in data folder of elasticsearch is index with "9JVFYLM3Q8Oh26gJfPxJVg" name!!!

Also even if i try to copy index data from older instance to ES 5.1.1 & restarting it ,the index name is getting changed to its uid value!!!


(Christian Dahlqvist) #4

You should generally not deal directly with the data on disk, so in my opinion this should not be a problem. If you want to see statistics about indices and shards, there are APIs for that, which use the index name. If you want to move data in and out of a cluster, it is better to use the snapshot and restore functionality that try to copy folders at the file system level.


(LuciferHBP) #5

Thanks again...
But i also tried with snapshot & restore method.

I am able to get all the indices & their data ( i checked this by creating indices in kibana).
But the name of indices in Elasticsearch 5.1.1 data folder is not coming as it is showing in kibana but instead as its uid name/vale.!!!

I also checked using following curl cmd:

curl "localhost:9200/_cat/indices?v"

output:

health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open index1 9JVFYLM3Q8Oh26gJfPxJVg5 1 152 0 103.9kb 103.9kb

.....


(Christian Dahlqvist) #6

As far as I can see this contains the index name (index1) as well as the uuid. I still do not understand what the problem is.


(LuciferHBP) #7

Actually i am asking why it is appearing as uid in elasticseach data folder but not as index name!!! :confused:
Inside "elasticsearch-5.1.1\data\nodes\0\indices" dir i am getting folder with "9JVFYLM3Q8Oh26gJfPxJVg5" name not as index1 :sweat:

Thanks..


(Christian Dahlqvist) #8

I believe the reason it was changed to uuid was that index names may contain characters that do not work well in file system paths.


(system) #9

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.