elasticsearch template
# curl -XPUT localhost:9200/_template/template_1 -d '
{
"template" : "te*",
"settings" : {
"number_of_shards" : 1,
"number_of_replicas":2
},
"mappings" : {
"type1" : {
"_source" : { "enabled" : false }
}
}
}
'
{"acknowledged":true}
# curl -XGET localhost:9200/_template/template_1?pretty
{
"template_1" : {
"order" : 0,
"template" : "te*",
"settings" : {
"index" : {
"number_of_shards" : "1",
"number_of_replicas" : "2"
}
},
"mappings" : {
"type1" : {
"_source" : {
"enabled" : false
}
}
},
"aliases" : { }
}
}
curl -XDELETE localhost:9200/_template/template_1
# curl -XPUT 'http://localhost:9200/template_test/tweet/1' -d '{
> "user" : "kimchy",
> "post_date" : "2009-11-15T14:12:12",
> "message" : "trying out Elasticsearch"
> }'
{"_index":"template_test","_type":"tweet","_id":"1","_version":1,"result":"created","_shards":{"total":3,"successful":1,"failed":0},"created":true} # curl -XGET 'http://localhost:9200/template_test/tweet/1'
{"_index":"template_test","_type":"tweet","_id":"1","_version":1,"found":true,"_source":{
"user" : "kimchy",
"post_date" : "2009-11-15T14:12:12",
"message" : "trying out Elasticsearch"
}}
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(待续...)
动态模板 Dynamic templates allow you to define custom mappings that can be applied to dynamically added ...
- 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 ...
随机推荐
- javascript继承的6种方法
1原型式继承 简介:对类式继承的封装,过渡对象相当于子类. function inheritObject(o) { //声明过渡函数对象 function F() {} //过渡对象的原型继承父类 F ...
- vue安装过程
我们3个安装参考的博客地址 http://blog.qianduanchina.cn/post/596c5bb27838a71273eb4da3 http://blog.csdn.net/unamat ...
- vs+qt 运行过程出现cannot run rc.exe
刚开始,我按照网上的一堆教程在qt creator中设置了各种东西,设置完以后,运行时出现cannot run rc.exe,根据百度,将C:\Program Files (x86)\Windows ...
- CVE-2017-12615和CVE-2017-12616
Tomcat代码执行漏洞分析测试 1. 漏洞花絮 2017年9月19日,Apache Tomcat官方确认并修复了两个高危漏洞,漏洞CVE编号:CVE-2017-12615和CVE-20 ...
- github与github网站push神器
GitBook.Editor(全英文,无汉化) 链接: http://pan.baidu.com/s/1slIZ5jJ 密码: q9mw source tree (汉化中文) 本地需要安装git客户端 ...
- C++11如何减少内存拷贝次数
C++11中出现了很多迷人的特性.例如智能指针实现高效的内存管理,std::bind和std::function函数封装器,以及lambda实现的函数对象语法糖,都是使我着迷的地方. 而C++11最大 ...
- PythonStudy——列表类型 List type
# 1.定义 ls = [3, 1, 2] # 语法糖 | 笑笑语法 print(ls) ls = list([3, 1, 2]) # 本质 print(ls) # 嵌套 ls = [3, 1, [3 ...
- FTP文件传输服务
FTP文件传输服务 一 .FTP 连接及传输的模式 l 控制连接:TCP21,用于发送FTP命令信息. l 数据连接:TCP 20, 用于上传下载数据. · 数据连接建立的类型: ·主动模式: 服 ...
- SpringBoot入门(0) HelloWorld的实现与原理分析
SpringBoot(0) HelloWorld的实现与原理分析 一.环境准备 1.1 环境约束 –jdk1.8:Spring Boot 推荐jdk1.7及以上:java version “1.8.0 ...
- Consul之:服务注册与发现
一.服务的管理(注册与发现)有三种方式: 1:通过配置文件的方式静态注册2:通过HTTP API接口来动态注册(spring cloud使用方式,spring cloud中使用的是consul api ...