Elasticsearch template(待续...)
动态模板
Dynamic templates allow you to define custom mappings that can be applied to dynamically added fields based on:
- the datatype detected by Elasticsearch, with
match_mapping_type
. - the name of the field, with
match
andunmatch
ormatch_pattern
. - the full dotted path to the field, with
path_match
andpath_unmatch
.
The original field name {name}
and the detected datatype {dynamic_type
} template variables can be used in the mapping specification as placeholders.
动态模板允许你基于以下条件来对动态增加的字段的映射进行自定义:
1. match_mapping_type 定义 ES 自动检测的数据类型
2. match、unmatch 或 match_pattern 匹配字段名称
3. path_match、path_unmatch 定义字段的全路径
参数说明
template
settings
注意事项
dynamic_templates 类型为数组,多个匹配条件要写为数据的不同元素
示例
为所有索引 (index) 的所有类型 (type) 的所有字符串类型字段(field)都设置为 not_analyzed。
curl -XPUT 'localhost:9200/_template/all' -d '
{
"order": 0,
"template": "*",
"settings": {
"index.number_of_shards": ""
},
"mappings": {
"_default_": {
"dynamic_templates": [
{
"string": {
"mapping": {
"index": "not_analyzed",
"type": "string"
},
"match_mapping_type": "string",
"match": "field_name*"
}
}
]
}
},
"aliases": {}
}
}
'
Elasticsearch template(待续...)的更多相关文章
- Elasticsearch template学习
Elasticsearch template Elasticsearch存在一个关键问题就是索引的设置及字段的属性指定,最常见的问题就是,某个字段我们并不希望ES对其进行分词,但如果使用自动模板创建索 ...
- Elasticsearch template configuration
Index templates allow defining templates thatwill automatically be applied to new indices created. T ...
- elasticsearch template
# curl -XPUT localhost:9200/_template/template_1 -d '{"template" : "te*","s ...
- lagstash + elasticsearch + kibana 3 + kafka 日志管理系统部署 02
因公司数据安全和分析的需要,故调研了一下 GlusterFS + lagstash + elasticsearch + kibana 3 + redis 整合在一起的日志管理应用: 安装,配置过程,使 ...
- ElasticSearch实战:Linux日志对接Kibana
本文由云+社区发表 ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于RESTFul web接口.ElasticSearch是用Java开发 ...
- Elasticsearch - 简单介绍
Elasticsearch 简介 1. 什么是 Elasticsearch ElasticSearch 是一个基于 Lucene 的搜索服务器. 它了一个分布式多 用户能力的全文搜索引擎,能够达到实时 ...
- Elasticsearch学习之配置小记
基于 elasticsearch 1.4.4 版本.安装方式为RPM安装.所有涉及路径需根据实际情况来设置判断. 0x01 内存调整 调整ES内存分配有多种方式,建议调整 /etc/sysconfig ...
- elasticsearch+logstash+redis+kibana 实时分析nginx日志
1. 部署环境 2. 架构拓扑 3. nginx安装 安装在192.168.176.128服务器上 这里安装就简单粗暴了直接yum安装nginx [root@manager ~]# yum -y in ...
- elasticsearch配置小记(转)
原文 http://bigbo.github.io/pages/2015/04/10/elasticsearch_config/ 基于 elasticsearch 1.4.4 版本.安装方式为RPM ...
随机推荐
- HUST 1017 Exact cover dance links
学习:请看 www.cnblogs.com/jh818012/p/3252154.html 模板题,上代码 #include<cstdio> #include<cstring> ...
- 解决outlook无法启动
当outlook出现上述问题时,修复的方案: 1.在打开的命令提示符窗口中,输入"cd C:\Program Files\Microsoft Office\Office12"然后回 ...
- 将树莓派Raspberry Pi设置为无线路由器(WiFi热点AP,RTL8188CUS芯片)
http://wangye.org/blog/archives/845/ 最近又开始折腾起Raspberry Pi来了,因为某处上网需要锐捷拨号,于是我就想能不能让我的树莓派代劳,当然首先要将其改造为 ...
- 细谈Linux和windows差异之图形化用户接口、命令行接口
相信来看本博文的朋友,肯定是已经玩过linux好段时间了,才能深刻理解我此番话语. 这是在Windows下的命令行接口 这是windows下的用户接口 就是它,explorer.ext,可以去尝试.把 ...
- JS实现复制到剪贴板
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...
- unigui下载文件
lblProduct.Caption := '<a href="files\1.t" target=new>要下载的文件名</a>';
- Android 命名规范和编码规范
简明概要 多写注释 一.关于命名规范 对于开发项目来说肯定是要有统一的规范,然而命名规范需要做到哪几点呢? 答: 首先,不能反人类. 再来就是,要望文而知其意. 下面就来说说具体该怎么去规范我们的代 ...
- DRM你又赢了:其API纳入HTML5标准
摘要:W3C今天发布了一份加密媒体扩展工作草案(EME),将支持DRM多媒体数字内容,而且浏览器将无需使用Flash或Silverlight.EME定义了一系列API,允许JavaScript和HTM ...
- datagridview控件--导出Excel
dataGridView控件可以说很方便的显示了数据,而且对于修改和删除数据也很方便,我在前面的一篇博客中写到了如何去绑定数据到该控件上dataGridView控件--绑定数据方法,今天我将如何将数据 ...
- 通过存储过程进行分页查询的SQL示例
--创建人:zengfanlong --创建时间:-- :: --说明:根据公司简写代码获取当前待同步的气瓶档案数据(分页获取) ALTER PROCEDURE [UP_GasBottles_GetS ...