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

qq刷赞网站推广软件网红营销活动

qq刷赞网站推广软件,网红营销活动,梦幻西游网页版微信区和app互通吗,制作网站要多少费用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/508307.html

相关文章:

  • PHP MySQL 插入数据详解
  • 互联网建网站做网站 上海
  • UiPath2025笔记第九节:Orchestrator设置邮件连接,以QQ邮箱为例
  • 详细讲解一下机器人的NVR控制
  • 3网站建设公司怎样建设责任文化
  • 网站开发实战框架网站建设
  • w3c网站模板可视化app开发工具
  • Orleans 可观测性实战:基于源码的指标与分布式追踪(含 Prometheus 集成)
  • 成都 企业网站设计天眼查询企业信息电话
  • 肥料网站建设 中企动力网站企业备案和个人备案的区别吗
  • 用coze工作流生成软著申请材料
  • 【SAP FI】3.资产会计_3.固定资产模块的基本业务操作-资产价值浏览器折旧
  • 力扣(LeetCode) ——118.杨辉三角(C++)
  • 媒体发布的技术革命:Infoseek如何用AI重构企业传播全链路
  • docker拉镜像失败终极解决方案
  • 自己建设网站要花多少钱wordpress really static
  • 如何在百度推广网站大连工业大学专升本
  • 英语单词中有趣的颠倒与学习
  • vue实现模拟deepseekAI功能
  • html网站开发例子wordpress 远程附件
  • 在线心理健康网站建设杨凌做网站
  • Git将本地项目推送到GitLab
  • 廊坊网站建设公司哪个好北京微信网站设计报价
  • wordpress搜索返回页面内容优化seo公司哪家好
  • Termux 安装盘搜搜PanSou,快速找到网盘资源链接,支持各大网盘,自定义部署,数据存储到手机,打造移动搜索资源库
  • Foundation 网格实例
  • 股票300394(天孚通信)2025年4月20日
  • 公司网站怎么做啊ui设计行业的现状和发展前景
  • 专门做图片是网站深圳百度首页优化
  • 清镇网站建设推广科技感网站设计