码迷,mamicode.com
首页 > 其他好文 > 详细

ES 快速开始

时间:2020-11-27 11:47:06      阅读:18      评论:0      收藏:0      [点我收藏+]

标签:replicas   bsp   lte   date   case   text   tle   快速   cat   

 ES语句构造麻烦,每次都拼,这次备份一下

 

1. 创建索引

PUT http://sae1002.qihoo.ai:9200/kosmos

{"settings":{"index":{"number_of_shards":1,"number_of_replicas":1},"analysis":{"filter":{"jieba_stop":{"type":"stop","stopwords_path":"stopwords/stopwords.txt"},"jieba_synonym":{"type":"synonym","synonyms_path":"synonyms/synonyms.txt"}},"analyzer":{"jieba":{"tokenizer":"jieba_index","filter":["lowercase","jieba_stop","jieba_synonym"]}}}},"mappings":{"properties":{"title":{"type":"text"},"des":{"type":"text"},"author":{"type":"keyword"},"sourceFileUrl":{"type":"keyword"},"date":{"type":"keyword"}}}}

 

 

 

 

查看索引 http://sae1002.qihoo.ai:9200/_cat/

查看设置和schema:http://sae1002.qihoo.ai:9200/kosmos/_settings  http://sae1002.qihoo.ai:9200/kosmos/_mappings

 

ES 快速开始

标签:replicas   bsp   lte   date   case   text   tle   快速   cat   

原文地址:https://www.cnblogs.com/kuipertan/p/14030955.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!