2.2.0的啓動和6.幾 啓動路徑、端口同樣,可是進入Head的路徑不同html
http://localhost:9200/
進入Head的方式2.2 的在node
http://localhost:9200/_plugin/head/
進入6.幾的方式app
先要本身下載,把Head拷貝進去目錄。而後修改配置文件,ide
而後,在head源代碼目錄下啓動nodejs:grunt
grunt server
效果如圖:spa
最後在9100端口進入Headcode
http://localhost:9100
分詞查找orm
http://localhost:9200/_analyze?analyzer=ik_max_word&&text=中華人民共和國
查看Mapping的方法server
http://127.0.0.1:9200/jlindex/_mapping?pretty
經過Head的複合查詢設置Mapping(文本禁用分詞)xml
找到Head的複合查詢部分
在查詢第一行填入地址和要建立索引的名稱,例如索引的名稱是jlindex
另外,查詢下左邊欄位置空,右邊欄位由於是新增索引和設置Mapping,因此設置爲POST
把要提交的Mapping粘貼進去,點擊提交按鈕便可完成新建索引的Mapping。
{
"mappings": {
"saledatatype": {
"properties": {
"FYear": {
"type": "string",
"index": "not_analyzed"
},
"FQuarter": {
"type": "string",
"index": "not_analyzed"
},
"FMonth": {
"type": "string",
"index": "not_analyzed"
},
"FDate": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
},
"City": {
"type": "string",
"index": "not_analyzed"
},
"CustomerName": {
"type": "string",
"index": "not_analyzed"
},
"FAmount": {
"type": "double"
},
"FItemClassID": {
"type": "long"
},
"FItemID": {
"type": "long"
},
"FItemID1": {
"type": "long"
},
"FItemID2": {
"type": "long"
},
"FItemID3": {
"type": "long"
},
"FItemID4": {
"type": "long"
},
"FItemID5": {
"type": "long"
},
"FItemID6": {
"type": "long"
},
"FName": {
"type": "string",
"index": "not_analyzed"
},
"FName1": {
"type": "string",
"index": "not_analyzed"
},
"FName2": {
"type": "string",
"index": "not_analyzed"
},
"FName3": {
"type": "string",
"index": "not_analyzed"
},
"FName4": {
"type": "string",
"index": "not_analyzed"
},
"FName5": {
"type": "string",
"index": "not_analyzed"
},
"FName6": {
"type": "string",
"index": "not_analyzed"
},
"FNumber": {
"type": "string",
"index": "not_analyzed"
},
"FNumber1": {
"type": "string",
"index": "not_analyzed"
},
"FNumber2": {
"type": "string",
"index": "not_analyzed"
},
"FNumber3": {
"type": "string",
"index": "not_analyzed"
},
"FNumber4": {
"type": "string",
"index": "not_analyzed"
},
"FNumber5": {
"type": "string",
"index": "not_analyzed"
},
"FNumber6": {
"type": "string",
"index": "not_analyzed"
},
"FQTy": {
"type": "double"
},
"ItemName": {
"type": "string",
"index": "not_analyzed"
},
"ItemNumber": {
"type": "string",
"index": "not_analyzed"
},
"Province": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
設置IK分詞
{
"mappings": {
"saledatatype": {
"properties": {
"City": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"CustomerName": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FAmount": {
"type": "double"
},
"FDate": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
},
"FItemClassID": {
"type": "long"
},
"FItemID": {
"type": "long"
},
"FItemID1": {
"type": "long"
},
"FItemID2": {
"type": "long"
},
"FItemID3": {
"type": "long"
},
"FItemID4": {
"type": "long"
},
"FItemID5": {
"type": "long"
},
"FItemID6": {
"type": "long"
},
"FName": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FName1": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FName2": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FName3": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FName4": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FName5": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FName6": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FNumber": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FNumber1": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FNumber2": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FNumber3": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FNumber4": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FNumber5": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FNumber6": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"FQTy": {
"type": "double"
},
"ItemName": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"ItemNumber": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"Province": {
"type": "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
}
}
}
}
}