Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
852 views
in Technique[技术] by (71.8m points)

elasticsearch - How data is stored physically in elastic search?

If I navigate to Data directory of elastic search :

/nodes/0/indices/gb

Here what tree command shows :

├── 0
│?? ├── index
│?? │?? ├── segments_6
│?? │?? └── write.lock
│?? ├── _state
│?? │?? └── state-6.st
│?? └── translog
│??     ├── translog-1.ckp
│??     ├── translog-2.ckp
│??     ├── translog-3.ckp
│??     ├── translog-4.ckp
│??     ├── translog-5.ckp
│??     ├── translog-5.tlog
│??     ├── translog-6.ckp
│??     ├── translog-6.tlog
│??     ├── translog-7.tlog
│??     └── translog.ckp
├── 1
│?? ├── index
│?? │?? ├── _0_1.liv
│?? │?? ├── _0.cfe
│?? │?? ├── _0.cfs
│?? │?? ├── _0.si
│?? │?? ├── _1.cfe
│?? │?? ├── _1.cfs
│?? │?? ├── _1.si
│?? │?? ├── segments_9
│?? │?? └── write.lock
│?? ├── _state
│?? │?? └── state-6.st
│?? └── translog
│??     ├── translog-2.ckp
│??     ├── translog-3.ckp
│??     ├── translog-4.ckp
│??     ├── translog-5.ckp
│??     ├── translog-9.tlog
│??     └── translog.ckp
├── 2
│?? ├── index
│?? │?? ├── _0.cfe
│?? │?? ├── _0.cfs
│?? │?? ├── _0.si
│?? │?? ├── segments_7
│?? │?? └── write.lock
│?? ├── _state
│?? │?? └── state-6.st
│?? └── translog
│??     ├── translog-2.ckp
│??     ├── translog-3.ckp
│??     ├── translog-4.ckp
│??     ├── translog-5.ckp
│??     ├── translog-6.ckp
│??     ├── translog-6.tlog
│??     ├── translog-7.ckp
│??     ├── translog-7.tlog
│??     ├── translog-8.tlog
│??     └── translog.ckp
├── 3
│?? ├── index
│?? │?? ├── _0.cfe
│?? │?? ├── _0.cfs
│?? │?? ├── _0.si
│?? │?? ├── segments_7
│?? │?? └── write.lock
│?? ├── _state
│?? │?? └── state-6.st
│?? └── translog
│??     ├── translog-2.ckp
│??     ├── translog-3.ckp
│??     ├── translog-4.ckp
│??     ├── translog-5.ckp
│??     ├── translog-6.ckp
│??     ├── translog-6.tlog
│??     ├── translog-7.ckp
│??     ├── translog-7.tlog
│??     ├── translog-8.tlog
│??     └── translog.ckp
├── 4
│?? ├── index
│?? │?? ├── _0.cfe
│?? │?? ├── _0.cfs
│?? │?? ├── _0.si
│?? │?? ├── segments_7
│?? │?? └── write.lock
│?? ├── _state
│?? │?? └── state-6.st
│?? └── translog
│??     ├── translog-2.ckp
│??     ├── translog-3.ckp
│??     ├── translog-4.ckp
│??     ├── translog-5.ckp
│??     ├── translog-6.ckp
│??     ├── translog-6.tlog
│??     ├── translog-7.ckp
│??     ├── translog-7.tlog
│??     ├── translog-8.tlog
│??     └── translog.ckp
└── _state
    └── state-8.st

Which of the file contains actual data ? How can I see That ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

All those files contain data and each contains a specific type of data (inverted index, field data, document values, etc). The files in the index sub-folder are files created by Lucene in order to store all the needed data:

There are many more file types available (term frequency, term proximity, etc) as can be seen in the first link I gave above. All those files are binary files that you cannot simply view with a text editor. You can use the Luke tool from the Lucene Toolbox in order to view the content of those files.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...