How elastic search stores index

I am wondering how elasticsearch searches go so fast. Does it use an inverted index and how is it represented in memory? How is it stored on disk? How does it boot from disk to memory? And how does it combine indexes so quickly (I mean when searching, how does it combine two lists so quickly)?

+3
source share
2 answers

elasticsearch uses lucene to store indexes of reverse documents. Lucene, in turn, will store read-only files called reverse index segments. Each segment contains some documents. These segments are read only and do not change. To delete or update documents, elasticsearch will save a delete / update list, which will be used to overwrite the results from read-only segments.

With this approach, some segments may be completely outdated or contain only a few modern data. Such segments will be overwritten or deleted.

There is an interesting elasticsearch plugin that visualizes segments and the rewrite process: https://github.com/polyfractal/elasticsearch-segmentspy

, .

API : http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-segments.html

+1

, ElasticSearch (ES). ES , - -

{
    "_id": 1,
    "text": "Hello, John"
}

{
    "_id": 2,
    "text": "Bonjour, John"
}

  Word   |   Docs 
___________________
 Hello   |    1
 Bonjour |    2
 John    |   1&2

, ID. , , , . - .

ES , ES . - /data/clustername/nodes/..., , , . , ES . , , .

- ES , ES, .

+1

All Articles