一、head插件建立
完成。
二、postman發送http請求建立
請求體裡面寫json,代碼如下
{ "mappings":{
"acticle":{
"properties":{
"id":{
"type":"long",
"store":"true"
},
"title":{
"type":"text",
"store":"true",
"index":true,
"analyzer":"standard"
},
"content":{
"type":"text",
"store":"true",
"index":true,
"analyzer":"standard"
} } } }}
注意。在url裡面填寫加上?include_type_name=true不然會報postman “error”: { “root_cause”:錯誤
在建立索引後加mapping需要以下步驟:
發送之後結果為true
删除索引庫
将狀态改為delete,url改為對應地庫名。