elasticseach-ik分词 创建索引
1. 指令方式创建
curl -XPUT http://192.168.199.126:9200/ikIndex2
2. head插件方式创建 如下图

创建索引的映射
POST http://192.168.199.126:9200/ik2/fulltext/_mapping
{
"properties": {
"content": {
"type": "text",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
}
}
}

添加数据
post http://192.168.199.126:9200/ik2/fulltext/1/
{"content":"美国留给伊拉克的是个烂摊子吗"}
post http://192.168.199.126:9200/ik2/fulltext/2/
{"content":"中韩渔警冲突调查:韩警平均每天扣1艘中国渔船"}
post http://192.168.199.126:9200/ik2/fulltext/3/
{"content":"中国驻洛杉矶领事馆遭亚裔男子枪击 嫌犯已自首"}
post http://192.168.199.126:9200/ik2/fulltext/4/
{"content":"公安部:各地校车将享最高路权"}
