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
matchandunmatchormatch_pattern. - the full dotted path to the field, with
path_matchandpath_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 ...
随机推荐
- 第一章 Lambda表达式
1.1 Why Lambdas? 当你操作多线程的时候,你会像下面这样将要处理的代码放到run()函数中: class Worker implements Runnable { public void ...
- 设计模式_State_状态模式
形象例子: 跟MM交往时,一定要注意她的状态哦,在不同的状态时她的行为会有不同,比如你约她今天晚上去看电影,对你没兴趣的MM就会说“有事情啦”,对你不讨厌但还没喜欢上的MM就会说“好啊,不过可以带上我 ...
- RequestHander类介绍
RequestHander是一个抽象类,是一个线程.它封装了一个Socket.代码不难: package org.simpleHTTPServer; import java.io.IOExceptio ...
- Android选项卡TabHost方式实现
1.布局XML: <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android= ...
- REST和SOAP
转自:http://blog.csdn.net/smstong/article/details/5312136 我感觉维基百科说的REST解释的就听明白的,摘录下来: 含状态传输(英文:Represe ...
- ZOJ Light Bulb - 3203
题意:人左右走动,求影子L的最长长度. 思路:三分人在D上的位置.注意影子长=D-x+H-(H-h)*D/x. #include<iostream> #include<stdio.h ...
- HIbernate学习笔记(八) hibernate缓存机制
hibernate缓存 一. Session级缓存(一级缓存) 一级缓存很短和session的生命周期一致,因此也叫session级缓存或事务级缓存 hibernate一级缓存 那些方法支持一级缓存: ...
- CentOS 6.5 安装配置VSFTP
1.下载安装VSFTP 首先查看当前系统是否已经安装VSFTP,若未安装则使用yum安装. chkconfig --list | grep vsftpd #查看是否安装 yum install vsf ...
- Unity3D之AssetBundle学习:Android上运行笔记
路径统一 在Android上加载StreamingAssets文件夹下的AssetBundle文件,首先需要对加载地址进行处理,注意PC.Android和IOS的地址不一致需要针对不同的平台不同的处理 ...
- C++学习笔记(七):函数
函数通用格式: typeName functionName(parameterList) { //statements return value;//value is type cast to typ ...