Index name and UUID

Hi
Elastic don't save index and it save something like UUID as follow :

[root@es-data-01 ~]# curl -XGET '172.24.69.16:9200/_cat/indices'

green open finallog-2017.05.07 -i5_HbE9Twa_-OS17yLW0w 5 1 1 0 10.9kb 5.4kb
green open test4-2017.05.10 6wumml3kS5eJUTG2QFUzUw 5 1 138 0 613.3kb 306.6kb
green open test4-2017.05.09 hiIbmYp0SNChAC5_QZzFyA 5 1 41531 0 9.3mb 4.6mb
green open test4-2017.05.12 B_AmJVWUSPOFdHE2LhQu0g 5 1 138 0 619.9kb 310.3kb
green open test2-2017.05.09 yhe5dKawTaGWJiqOm8dOQw 5 1 3 0 30.1kb 15kb
green open test4-2017.05.13 F29DhDCbQa6s43-Guo6sYQ 5 1 138 0 484.9kb 246.3kb
green open .kibana W9eLFC76Q86B0F6WFLOqNA 1 1 2 0 19.7kb 9.8kb
green open test4-2017.05.14 w76gvtX6S4mtauVy6yNMMg 5 1 5466 0 1.9mb 974.4kb
green open test4-2017.05.15 ivlrQiLoSB-qLd7yEYMEgQ 5 1 34 0 380.5kb 190.2kb
green open test3-2017.05.09 9VRgWUxtRv-S3xICyKWP6A 5 1 1 0 10.9kb 5.4kb
green open test1-2017.05.09 rKo3ZBX_QyGaw5w7z9eGJw 5 1 1 0 10.9kb 5.4kb
green open test4-2017.05.11 NCZ7xQc7T-yMSd2CQn0-Jg 5 1 138 0 485.2kb 234.6kb

[root@es-data-01 ~]# ll /var/lib/elasticsearch/nodes/0/indices/
total 0

drwxr-xr-x. 7 elasticsearch elasticsearch 51 May 14 06:18 6wumml3kS5eJUTG2QFUzUw
drwxr-xr-x. 6 elasticsearch elasticsearch 43 May 14 06:18 9VRgWUxtRv-S3xICyKWP6A
drwxr-xr-x. 6 elasticsearch elasticsearch 43 May 14 06:18 B_AmJVWUSPOFdHE2LhQu0g
drwxr-xr-x. 7 elasticsearch elasticsearch 51 May 14 06:18 F29DhDCbQa6s43-Guo6sYQ
drwxr-xr-x. 6 elasticsearch elasticsearch 43 May 14 06:18 hiIbmYp0SNChAC5_QZzFyA
drwxr-xr-x. 6 elasticsearch elasticsearch 43 May 14 06:18 -i5_HbE9Twa_-OS17yLW0w
drwxr-xr-x. 6 elasticsearch elasticsearch 43 May 14 20:01 ivlrQiLoSB-qLd7yEYMEgQ
drwxr-xr-x. 6 elasticsearch elasticsearch 43 May 14 06:18 NCZ7xQc7T-yMSd2CQn0-Jg
drwxr-xr-x. 6 elasticsearch elasticsearch 43 May 14 06:18 rKo3ZBX_QyGaw5w7z9eGJw
drwxr-xr-x. 6 elasticsearch elasticsearch 43 May 14 06:18 w76gvtX6S4mtauVy6yNMMg
drwxr-xr-x. 4 elasticsearch elasticsearch 27 May 14 06:22 W9eLFC76Q86B0F6WFLOqNA
drwxr-xr-x. 7 elasticsearch elasticsearch 51 May 14 06:18 yhe5dKawTaGWJiqOm8dOQw

Yes. And what is the problem?

You are not supposed to go in the directories but just use the APIs.

1 Like

i want to find indices with the index name

i want to find indices with the index name

What for?

That said, run a GET _cat/indices call and you can see what is the UUID of your index.

Dear dadoonet
why UUID ? I indexed my log with logstash, why it save it with UUID ?

Why not?

My question is still valid. Why do you care about that?

because i want to search by my name instead of UUID

Then run:

GET yourindexname/_search

And you will search within your index name.

Elasticsearch used to use the index name in the data directory structure, but as there were index names that were valid but caused problems with various file systems, the index name was replaced by UUID in the file system path to avoid having to restrict index naming further. Through all APIs you use the index name, not the UUID, so it should be transparent to you.

3 Likes

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