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. Android如何获取系统高度、标题栏和状态栏高度

    在android应用中,有时需要计算个View的位置,导致需要计算状态栏高度,标题栏高度等信息.为以后方便,在此做个简单记录. 晒代码前先了解一下android屏幕区域的划分,如下图(该图引用自此文h ...

  2. Android Retrofit实现原理分析

    retrofit有几个关键的地方. 1.用户自定义的接口和接口方法.(由动态代理创建对象.) 2.converter转换器.(把response转换为一个具体的对象) 3.注解的使用. 让我们跟随Ap ...

  3. Android RemoteViews 11问11答

    1.什么是RemoteView? 答:其实就是一种特殊的view结构,这种view 能够跨进程传输.并且这种remoteview 还提供了一些方法 可以跨进程更新界面.具体在android里面 一个是 ...

  4. 史上最完整的Android开发工具集合

    路径: http://www.apkbus.com/thread-252748-1-1.html

  5. concat、reverse面试题

    1.concat数组连接 ,,]; ,,]; ,,]; alert(arr3.concat(arr1,arr2)); 结果:9,9,9,2,3,4,5,6,7 2.reverse将数组内容颠个个 ,, ...

  6. 通过文件流stream下载文件

    public ActionResult ShowLocalizedXML(int id) { string orderName = ""; string xmlString = G ...

  7. Shell教程1​-第一个Shell脚本

    打开文本编辑器,新建一个文件,扩展名为sh(sh代表shell),扩展名并不影响脚本执行,见名知意就好,如果你用php写shell 脚本,扩展名就用php好了.输入一些代码: #!/bin/bash ...

  8. Android开发如何在4.0及以上系统中自定义TitleBar

    本文将通过一个实例讲解怎么实现在4.0及以上系统版本中实现自定义TitleBar,这只是我自己找到的一种方法; xml布局文件 activity_main.xml <RelativeLayout ...

  9. 什么是SPF?如何设置企业邮箱的SPF呢?(TXT记录)

    什么是SPF?   (Sender Policy Framework) 的缩写,一种以IP地址认证电子邮件发件人身份的技术,是非常高效的垃圾邮件解决方案. 接收邮件方会首先检查域名的SPF记录,来确定 ...

  10. 搭建Eclipse、Resin Web开发环境

    搭建Eclipse.Resin Web开发环境 一.当然是安装java开发环境 参看: Java环境的搭建 http://www.cnblogs.com/ghj1976/archive/2010/04 ...