找到原始模板并修改


找到要修改的原始索引对应的模板(最好当初创建时就设计好便于修改)

#例如原来索引是my_es_index_v1,那么我们创建 一个别名,使用POST 方法
curl -XPOST localhost:9200/_aliases -d
{
"actions":[
{
"add":{"aliases":"my_es_index_aliases","index":"my_es_index_v1"}
}
]
}
#那么以后就可以通过别名访问my_es_index_aliases访问相关数据了

创建新索引


对应修改后的mapping

curl -XPOST localhost:9200/_aliases -d '
{
"actions": [
{ "remove": {
"alias": "my_es_index_aliases",
"index": "my_es_index_v1"
}},
{ "add": {
"alias": "my_es_index_aliases",
"index": "my_es_index_v2"
}}
]
}

删除老索引即可

Elasticsearch修改template的mapping并迁移的更多相关文章

  1. logstash的output配置中指定elasticsearch的template

    转自:https://blog.csdn.net/felix_yujing/article/details/78930389 之前采用的是通过filebeat收集nginx的日志,直接到elastic ...

  2. elasticsearch模板 template

    https://elasticsearch.cn/article/335 elasticsearch模板 template 可以考虑的学习点: mapping的 _default_类型 动态模板:dy ...

  3. elasticsearch index 之 put mapping

    elasticsearch index 之 put mapping   mapping机制使得elasticsearch索引数据变的更加灵活,近乎于no schema.mapping可以在建立索引时设 ...

  4. zabbix修改Template OS Linux模版使已使用内存(Used memory)更准确

    说明: [root@coolnull ~]# free -m total used free shared buffers cached Mem: 995 785 209 0 6 92 -/+ buf ...

  5. Elasticsearch NEST – Examples for mapping between Query and C#

    Elasticsearch NEST – Examples for mapping between Query and C# During my training with Elasticsearch ...

  6. Elasticsearch 修改数据

    章节 Elasticsearch 基本概念 Elasticsearch 安装 Elasticsearch 使用集群 Elasticsearch 健康检查 Elasticsearch 列出索引 Elas ...

  7. Elasticsearch修改分词器以及自定义分词器

    Elasticsearch修改分词器以及自定义分词器 参考博客:https://blog.csdn.net/shuimofengyang/article/details/88973597

  8. 关于Elasticsearch版本升级,Kibana报index迁移与需要x-pack插件问题

    关于Elasticsearch版本升级,Kibana报index迁移与需要x-pack插件问题 这个问题是由于elasticsearch旧版残留文件导致,使用下述指令删除即可 查看所有elastics ...

  9. elasticsearch 修改 mapping

    Elasticsearch的mapping一旦创建,只能增加字段,而不能修改已经mapping的字段.但现实往往并非如此啊,有时增加一个字段,就好像打了一个补丁,一个可以,但是越补越多,最后自己都觉得 ...

随机推荐

  1. 解决 PathVariable annotation was empty on param 0.

    今天在写网关关于远程调用Feign的时候报的一个错误,PathVariable注解为空.仔细看了一下代码发现问题出在用@PathVariable注解的时候 @PathVariable Integer ...

  2. iPhone 配置使用工具

    “iPhone 配置实用工具”可让您轻松地创建.维护和安装配置描述文件及对配置描述文件进行加密,跟踪和安装预置描述文件与授权的应用程序,以及采集包括控制台日志在内的设备信息. http://suppo ...

  3. 通过NAT转发实现私网对外发布信息

    我们可以在防火墙的外部网卡上绑定多个合法IP地址,然后通过ip映射使发给其中某一个IP地址的包转发至内部某一用户的WWW服务器上,然后再将该内部WWW服务器响应包伪装成该合法IP发出的包. 具体的IP ...

  4. sp_replication_agent_checkup

    Transact-SQL 参考sp_replication_agent_checkup 检查每个分发数据库的复制代理程序,这些复制代理程序正在运行但在指定的心跳信号间隔内没有历史记录.此存储过程在分发 ...

  5. 【Dynamic Programming】DP算法

    http://www.hawstein.com/posts/dp-novice-to-advanced.html

  6. tomcat设置debug模式

    1.设置 编辑catalina.bat,在 rem Guess CATALINA_HOME if not definedset "CURRENT_DIR=%cd%"if not & ...

  7. VC++6.0远程调试(亲试成功)

    0 前言 VS2008及以上远程调试上篇已经讲过,这里再讲下VC++6.0开发环境下的远程调试能力,仅需下面4步即可,更方便的就接着后面的5-6步. 因为目标程序需要在有采集卡等相关硬件支持下的工控机 ...

  8. Python多线程运行带多个参数的函数

    在python中经常会到用多线程处理某个函数来缩短运行时间. from multiprocessing import Pool def work(x): return x+1 pool = Pool( ...

  9. MTK 系统禁止通知状态栏下拉

    之前看了网上很多修改,感觉太繁琐,修改代码太多,最后感觉还是自己找找,看能不能简单点 diff --git a/android/frameworks/base/packages/SystemUI/sr ...

  10. 8 -- 深入使用Spring -- 7... Spring 整合 Struts 2

    8.7 Spring 整合 Struts2 8.7.1 启动Spring 容器 8.7.2 MVC框架与Spring整合的思考 8.7.3 让Spring管理控制器 8.7.4 使用自动装配