PUT /lrtkdb { "mappings": { "properties": { "id": { "type": "keyword" }, "title": { "type": "text", "analyzer": "ik-index", "search_analyzer": "ik-smart" }, "pageimage": { "type": "keyword" }, "pagetype": { "type": "keyword" }, "spidertime": { "type": "long" }, "contenttime": { "type": "long" }, "tag": { "type": "text" }, "cate1": { "type": "keyword" }, "cate2": { "type": "keyword" }, "attr1": { "type": "keyword" } } }, "settings": { "analysis": { "filter": { "local_synonym" : { "type" : "synonym", "synonyms_path" : "/etc/elasticsearch/analysis-ik/synonym.txt" } }, "analyzer": { "ik-index": { "type": "custom", "tokenizer": "ik_max_word", "filter": [ "local_synonym" ] }, "ik-smart": { "type": "custom", "tokenizer": "ik_smart", "filter": [ "local_synonym" ] } } } } }
创建一个索引
猜你喜欢
转载自www.cnblogs.com/likecs/p/12060828.html
今日推荐
周排行