Elasticsearch 2.3.2 创建index及type
2016-06-16 10:53
239 查看
1 创建索引及TYPE
1.1 创建索引
可在head中直接界面操作添加使用命令语句创建
{ "settings": { "index": { "number_of_shards": 5, "number_of_replicas": 1 } } } |
1.2 创建type
"analyzer": "ik" 中文分词{ "news": { "properties": { "content": { "analyzer": "ik", "type": "string" }, "author": { "index": "not_analyzed", "type": "string" }, "title": { "analyzer": "ik", "type": "string" }, "category": { "index": "not_analyzed", "type": "string" }, "publish_date": { "format": "yyyy/mm/dd", "type": "date" } } } } |
1.3 同时创建index及type
{ "settings": { "index": { "number_of_replicas": "1", "number_of_shards": "5" } }, "mappings": { "news": { "properties": { "content": { "analyzer": "ik", "type": "string" }, "author": { "index": "not_analyzed", "type": "string" }, "title": { "analyzer": "ik", "boost": 5, "type": "string" }, "category": { "index": "not_analyzed", "type": "string" }, "publish_date": { "format": "yyyy/mm/dd", "type": "date" } } } } } |
相关文章推荐
- 巧用mysql提示符prompt清晰管理数据库的方法
- 两大步骤教您开启MySQL 数据库远程登陆帐号的方法
- phpmyadmin 4+ 访问慢的解决方法
- linux系统下实现mysql热备份详细步骤(mysql主从复制)
- CentOS 5.5下安装MySQL 5.5全过程分享
- MySQL复制的概述、安装、故障、技巧、工具(火丁分享)
- MySQL中删除重复数据的简单方法
- 使用ElasticSearch6.0快速实现全文搜索功能的示例代码
- elasticsearch批量数据导入和导出
- 使用ElasticSearch+LogStash+Kibana+Redis搭建日志管理服务
- ElasticSearch 使用心得
- ES中如何使用逗号来分词
- ElasticSearch 守护进程 JSW
- elasticsearch2.3安装以及集群部署
- Elasticsearch2.2.0数据操作
- Elasticsearch2.2.0安装ik中文分词
- Elasticsearch2.2.0安装pinyin插件
- Elasticsearch Client(JAVA API) JAVA实例
- ElasticSearch简单介绍
- ELK(ElasticSearch, Logstash, Kibana)搭建实时日志分析平台