当前位置: 首页 > news >正文

海派虫网站推广软件如何对网站ftp进行上传

海派虫网站推广软件,如何对网站ftp进行上传,网站闭站保护,江门网站seo关键词排名优化elasticsearch reindex 索引。 背景: 索引test1 reindex到test2 修改sharding数量 程序是通过别名test1_alias访问索引 1、创建目标索引test2 索引需要手动提前创建自动创建可能会有mapping 不一致性的风险。 The destination should be configured as wanted …

elasticsearch reindex 索引。

背景:

索引test1 reindex到test2 修改sharding数量
程序是通过别名test1_alias访问索引

1、创建目标索引test2

索引需要手动提前创建自动创建可能会有mapping 不一致性的风险。

The destination should be configured as wanted before calling _reindex. Reindex does not copy the settings from the source or its associated template.Mappings, shard counts, replicas, and so on must be configured ahead of time.

复制test1的创建索引语句,修改sharding数量,

GET test1 查看索引

去掉下面test1属性的部分。

  "test1" : {"aliases" : {"test1_alias" : { }},"provided_name" : "test1","creation_date" : "1742388051938",, #注意前面的","号也要去掉,因为处于底部"uuid" : "LG30E6iGSPu-09Ca5nGbPQ","version" : {"created" : "6070099"}

PUT test2 创建索引
修改后的json文件
“number_of_shards” : 修改到目标数量
执行命令返回的数据

{"acknowledged" : true,"shards_acknowledged" : true,"index" : "test2"
}

2、禁止源索引test1 写

防止reindex期间写入数据,无法同步到目标索引

PUT /test1/_settings
{"index.blocks.write": true
}

对应放开写的命令

PUT /test1/_settings
{"index.blocks.write": false
}

3、 执行reindex 命令

POST _reindex?wait_for_completion=false&requests_per_second=1000
{"source": {"index": "test1"},"dest": {"index": "test2"}
}

返回信息

{"task" : "KsO_WIvXRC2ccMCCxbuF3w:28779984"
}

wait_for_completion=false 后台执行命令,requests_per_second=500限制速度500

调整同步速度命令:
POST _reindex/KsO_WIvXRC2ccMCCxbuF3w:28779984/_rethrottle?requests_per_second=500
取消任务命令
POST _tasks/KsO_WIvXRC2ccMCCxbuF3w:28779984/_cancel
查看reindex任务
GET _tasks?actions=*reindex&detailed

4、 查看任务是否完成

GET _tasks/KsO_WIvXRC2ccMCCxbuF3w:28779984

返回 true的时候就是完成了reindx
“completed” : true

5、修改别名指向新的索引别名

test1_alias指向test2

POST _aliases
{"actions": [{ "remove": { "index": "test1", "alias": "test1_alias" } },{ "add": { "index": "test2", "alias": "test1_alias" } }]
}
6、查看别名
GET test2

删除原来的索引(可以保留归档)

DELETE test1

加速执行速度的方法
1、增加size 默认1000

POST _reindex?wait_for_completion=false
{"source": {"index": "test1","size": 5000},"dest": {"index": "test2"}
}

2、副本改成0

PUT /test2/_settings
{"number_of_replicas": 0
}

3、禁止自动刷新

PUT /test2/_settings
{ "refresh_interval": -1 }

4、提高scroll的并行度


POST _reindex?slices=5&refresh

参考文档:
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html

https://blog.csdn.net/wwd0501/article/details/132192692

http://www.dtcms.com/a/476704.html

相关文章:

  • 化妆培训网站开发html做一个登录注册页面
  • 重庆企业做网站多少钱凡客诚品购物
  • 淘客网站建设收费吗飞凡网站建设
  • asp.net网站备份asp.net做网站的步骤
  • 做网站怎么加入索引功能一直在做竞价的网站是不是不需要做seo
  • 营销最好的网站建设公司网站的功能需求分析
  • 可以直接进入的舆情网站住建官网查询
  • 网站和系统的哪个容易做关键词如何排名在首页
  • 广东省网站备案注销三合一网站一般多少钱
  • asp.net网站开发技术双语企业网站源码
  • 如何制作一个静态网站源码wordpress分类门户主题
  • wordpress 获取友链网站seo推广
  • 佛山网站建站推广网页设计软件dw全称
  • 招商团队外包柳州seo培训
  • 龙华网站建设设计制作公司网址seo优化排名
  • 建站套餐和定制网站的区别江西网站建设找哪家
  • 济南高端建站广东网站推广公司
  • 张家界网站建设dcwork自己做网站能关联支付宝吗
  • 网站开发软件开发怎么样做淘宝网站用什么软件有哪些
  • 我想自己做网站吗微信自己开发小程序
  • 北京外贸行业网站建设网站建设费用的请示
  • 网站字体变大代码网站建设产品需求文档
  • 江西赣鄂皖路桥投资有限公司网站建设博客网站怎么做cpa
  • 郑州网站开发设计公司电话什么叫app是什么意思
  • 网站点击率高黄岩网站开发
  • 网站报错404wordpress数据库缓存
  • 食品配送做网站需要什么功能wordpress 侧边栏短代码
  • 想接做网站的单子百度seo教程
  • 网站建设费用设计建一个自己用的网站要多少钱
  • 凡科做的网站手工制作花