当前位置:网站首页>ES中删除索引的mapping字段时应该考虑的点
ES中删除索引的mapping字段时应该考虑的点
2020-11-06 21:45:00 【会开车的架构师】
- 创建新索引
- 新索引创建新mapping
- 原索引导出数据到新索引
- 新索引创建原索引一致的别名
- 删除原索引
针对于第四步:这个就要用到索引别名了,如果你最开始建索引的时候没有考虑设计索引别名,那就杯具了。
你可以把索引的名称设置成name_v1 别名设置为name,然后代码里面访问搜索的时候连接的其实是别名name;
这样当你以后索引结构调整需要重新创建的时候,就可以在新建一个索引name_v2,然后把数据初始化完成之后,把原来索引的别名去掉,把name_v2的别名设置成name,这样代码就不用改动了。
版权声明
本文为[会开车的架构师]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/4629483/blog/4529698
边栏推荐
猜你喜欢

The method of realizing high SLO on large scale kubernetes cluster

es创建新的索引库并拷贝旧的索引库 实践亲测有效!

一部完整的游戏,需要制作哪些音乐?

文件过多时ls命令为什么会卡住?

华为云微认证考试简介

What is alicloud's experience of sweeping goods for 100 yuan?
![Network security engineer Demo: the original * * is to get your computer administrator rights! [maintain]](/img/14/ede1ffa7811dbc2a5b15b9a7b17a5e.jpg)
Network security engineer Demo: the original * * is to get your computer administrator rights! [maintain]

CCR coin frying robot: the boss of bitcoin digital currency, what you have to know

一路踩坑,被迫聊聊 C# 代码调试技巧和远程调试

【转发】查看lua中userdata的方法
随机推荐
Introduction to the structure of PDF417 bar code system
[efficiency optimization] Nani? Memory overflow again?! It's time to sum up the wave!!
ES6 learning notes (3): teach you to use js object-oriented thinking to realize the function of adding, deleting, modifying and checking tab column
Basic principle and application of iptables
Outsourcing is really difficult. As an outsourcer, I can't help sighing.
Chainlink brings us election results into blockchain everipedia
Uncle Bob: the software architecture is similar to a house. Object oriented is the structure of the house, and the water pipe is functional programming
Basic usage of Vue codemirror: search function, code folding function, get editor value and verify in time
统计项目代码行数
消息队列(MessageQueue)-分析
How about small and medium-sized enterprises choose shared office?
Asp.Net Core learning notes: Introduction
StickEngine-架构11-消息队列(MessageQueue)
如何在终端启动Coda 2中隐藏的首选项?
(2) ASP.NET Core3.1 Ocelot routing
大道至简 html + js 实现最朴实的小游戏俄罗斯方块
How to understand Python iterators and generators?
What is the purchasing supplier system? Solution of purchasing supplier management platform
嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:王涛
EOS founder BM: what's the difference between UE, UBI and URI?