IK分詞器建立類型
請求的鏈接: 127.0.0.1:9200/noob/goods/_mapping
請求類型: PUT
請求數據:
{
"properties": {
"id": {
"type": "long" //long類型
},
"title": {
"type": "text", // 字符類型
"analyzer": "ik_max_word", // 使用ik分詞器 ik_max_word : 最細粒度 ik_smart : 最粗粒度
"search_analyzer": "ik_max_word"
},
"type": {
"type": "text",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
},
"goodsId":{
"type": "long"
}
}
}
通過查詢刪除數據
使用查找的方式,將查找的內容全部刪除
請求鏈接: 127.0.0.1:9200/noob/goods/_delete_by_query
請求類型: POST
請求數據:
{
"query": {
"match": {
"goodsId": "47959547"
}
}
}