Index templates allow defining templates thatwill automatically be applied to new indices created. The templates may include(1) settings, (2) mappings, or (3) a simple index pattern template thatcontrols if the template will be applied to the index created.

The templates could be placed in the runtimeusing APIs, such as putSettings, putMappings, etc. But this approach is NOTrecommended. Since templates could not be overwritten if there is a conflictwith the old one. In other words, once you have defined a template for certainindices that are being used, it is highly possible your new template does notwork for those indices. In order to adjust a template in the runtime,especially when changing the mappings, you have 2 options:

1.   in place modification(notice: old data may not be affected)

a.    stop the node

b.    delete the old settings/mappings

c.    put new settings/mappings

d.    restart the node.

2.   reindex everything

a.   create a new indexwith the new template

b.   copy the old data tothe new index during off-peak time

c.   redirect requests tothe new one when the clone is done.

d.   delete the old index

Index templates can also be placed within theconfig location (path.conf) under the templates directory (note, make sure toplace them on all master eligible nodes). All templates will be addedautomatically if it matches an index at the very beginning. This is recommendedapproach. Note, all templates are written in json format.

References

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-source-field.html

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-all-field.html

Elasticsearch template configuration的更多相关文章

  1. Elasticsearch template学习

    Elasticsearch template Elasticsearch存在一个关键问题就是索引的设置及字段的属性指定,最常见的问题就是,某个字段我们并不希望ES对其进行分词,但如果使用自动模板创建索 ...

  2. Elasticsearch template(待续...)

    动态模板 Dynamic templates allow you to define custom mappings that can be applied to dynamically added ...

  3. elasticsearch template

    # curl -XPUT localhost:9200/_template/template_1 -d '{"template" : "te*","s ...

  4. ElasticSearch实战:Linux日志对接Kibana

    本文由云+社区发表 ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于RESTFul web接口.ElasticSearch是用Java开发 ...

  5. Elasticsearch学习之配置小记

    基于 elasticsearch 1.4.4 版本.安装方式为RPM安装.所有涉及路径需根据实际情况来设置判断. 0x01 内存调整 调整ES内存分配有多种方式,建议调整 /etc/sysconfig ...

  6. elasticsearch+logstash+redis+kibana 实时分析nginx日志

    1. 部署环境 2. 架构拓扑 3. nginx安装 安装在192.168.176.128服务器上 这里安装就简单粗暴了直接yum安装nginx [root@manager ~]# yum -y in ...

  7. ELK(Logstash+Elasticsearch+Kibana)的原理和详细搭建

    一. Elastic Stack Elastic Stack是ELK的官方称呼,网址:https://www.elastic.co/cn/products ,其作用是“构建在开源基础之上, Elast ...

  8. elasticsearch配置小记(转)

    原文  http://bigbo.github.io/pages/2015/04/10/elasticsearch_config/ 基于 elasticsearch 1.4.4 版本.安装方式为RPM ...

  9. elasticSearch插件metricbeat收集nginx的度量指标

    ngx_http_stub_status_module模块是Nginx中用来统计Nginx服务所接收和处理的请求数量,只要在编译安装Nginx的时候加上参数--with-http_stub_statu ...

随机推荐

  1. 插件svn简单使用

    首先安装服务器Server 傻瓜式样操作.下一步下一步就这样完成了,选择的是个人版. 然后打开Server的图形化界面:VisualSVN Server Manager Repositories:资源 ...

  2. jquery火焰等效果导航菜单

    jQuery-火焰灯效果导航菜单 by zhangxinxu from http://www.zhangxinxu.com 本文地址:http://www.zhangxinxu.com/wordpre ...

  3. BZOJ 1589 采集糖果

    23333怎么调了一晚上.... #include<iostream> #include<cstdio> #include<cstring> #include< ...

  4. cocos2d-x使用python脚本创建项目的简单方法

    本文有CC原创,转载请注明地址:http://blog.csdn.net/oktears/article/details/13297003 在cocos2d-x2.1.4以上的版本中,取消了使用vs模 ...

  5. hihoCoder #1195 高斯消元·一

    题意:便利店老板为了促销,推出了组合包的形式,将不同数量的各类商品打包成一个组合.比如2袋薯片,1听可乐的组合只要5元,而1袋薯片,2听可乐的组合只要4元.通过询问老板知道:一共有N种不同的商品和M种 ...

  6. 【C#学习笔记】图片像素操作

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  7. (转)hadoop基本操作命令

    http://www.cnblogs.com/gpcuster/archive/2010/06/04/1751538.html 在这篇文章中,我们默认认为Hadoop环境已经由运维人员配置好直接可以使 ...

  8. 【转】Eclipse常用快捷键

    原文网址:http://denver.blog.51cto.com/272871/52219 编辑相关快捷键 1.[Alt+/] 为用户提供内容的辅助. 2.[Ctrl+O] 显示类中方法和属性的大纲 ...

  9. JS面向对象组件(二)--Javascript原型链

    原型链 : 实例对象与原型之间的连接,叫做原型链 –__proto__( 隐式连接 ),这就是原型链,平时我们是看不到的. 原型链的最外层 : Object.prototype function Aa ...

  10. JBPM4入门——9.自动节点单线执行

    JBPM入门系列文章: JBPM4入门——1.jbpm简要介绍 JBPM4入门——2.在eclipse中安装绘制jbpm流程图的插件 JBPM4入门——3.JBPM4开发环境的搭建 JBPM4入门—— ...