打开:
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, ...).
1 个回复
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自: strglee 、lz8086 、ybtsdst 、ziyou
打开:
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, ...).