Elasticsearch | 作者 lz8086 | 发布于2018年04月27日 | 阅读数:1616


laoyang360 - [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net

赞同来自: strglee lz8086 ybtsdst ziyou

http://elasticsearch-users.115 ... .html
When you open an index, the first thing that will happen will be allocating the primary shards to the latest version that exists on specific nodes. A Lucene index will be opened (can take time), and the transaction log will be replayed. Then, the replica (if you have) will be allocated and sync'ed against the primaries (reusing existing nodes with the same data). So, what is the cost of opening an index? The main cost is opening the shard index files (Lucene wise), and applying the transaction log. You can't really change the time it takes to open the Lucene index (unless you index less data / fields), but you can send flush to the index before closing it, so there won't be a need to replay the transaction log.



When you close an index, they take no resources on the cluster, except for disk size. Their data remain on the nodes, but, they are not available to search or index, and no resources (memory, file handles, ...).