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. BZOJ 4415 发牌

    线段树就好了啊. 为什么一眼splay啊... 其实splay也能过,但是线段树更方便? #include<iostream> #include<cstdio> #includ ...

  2. OK335xS ethtool 移植

    /******************************************************************* * OK335xS ethtool 移植 * 声明: * 由于 ...

  3. setAttribute一个兼容性问题

    前几天工作中遇到一个js问题,本来js就不大会,倒腾了好长时间,并在做弹窗的时候用到了setAttribute,出现了不兼容的问题,在网上查了好多,真是郁闷,看来啥都得学啊. 主要的工作是做一个根据时 ...

  4. wx菜单栏

    #include "MainFrame.h" BEGIN_EVENT_TABLE(MyFrame,wxFrame) EVT_MENU(wxID_FILE,MyFrame::OnMe ...

  5. 【解题报告】[动态规划] RQNOJ - PID38 / 串的记数

    原题地址:http://www.rqnoj.cn/problem/38 解题思路: 状态表示:dp[i][j][k]表示i个A,j个B,k个C组成的满足条件的字符串的个数 初始状态:dp[0][0][ ...

  6. Comparator与Comparable的异同

    同 它们都是Java的一个接口,都是用来实现集合中元素的比较.排序. 异 Comparator位于java.util下: Comparable位于java.lang下: Comparable(可比较的 ...

  7. 批量生成sqlldr文件,高速卸载数据

    SQL*Loader 是用于将外部数据进行批量高速加载的数据库的最高效工具,可用于将多种平面格式文件加载到Oracle数据库.SQL*Loader支持传统路径模式以及直接路径这两种加载模式.关于SQL ...

  8. 嵌入式 hi3518平台指定网卡测试是否通外网

    版权声明:本文为博主原创文章,未经博主允许不得转载. /********************************** (C) COPYRIGHT *********************** ...

  9. zzzzz

    Extension Method: Return another string if string is null or emptyJust a tiny little extension metho ...

  10. JDT入门

    1.打开Java类型 要打开一个Java类或Java接口以进行编辑,可以执行以下操作之一: 在编辑器中所显示的源代码里选择所要编辑的Java类或Java接口的名字(或者简单地将插入光标定位到所要编辑的 ...