force merge原理 + ES写入数据的过程 - reindex - include_type_name

-1.https://www.elastic.co/guide/en/elasticsearch/reference/7.2/removal-of-types.html  include_type_name

0.概念

The force merge API allows to force merging of one or more indices through an API.

Force merge should only be called against read-only indices. Running force merge against a read-write index can cause very large segments to be produced

Lucene每次会选取一些小的segments 进而merge到一个大的segment

 

1.命令

curl -X POST "192.168.1.111:9200/mytest/_forcemerge?pretty"
参考:https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-forcemerge.html

 

https://blog.csdn.net/sinat_16658263/article/details/90444038

2.原理

2.4ES写入数据的过程:

客户端选择一个node发送请求过去,这个node就是coordinating node (协调节点)
coordinating node,对document进行路由,将请求转发给对应的node
实际上的node上的primary shard处理请求,然后将数据同步到replica node
coordinating node,如果发现primary node和所有的replica node都搞定之后,就会返回请求到客户端
————————————————

 

posted @ 2020-03-23 10:34  littlevigra  阅读(2304)  评论(2编辑  收藏  举报