ES 快速开始

 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

 

posted on 2020-11-24 16:25  不忘初衷,方能致远  阅读(113)  评论(0编辑  收藏  举报

导航