3
我試圖通過郵遞員送elasticserach多搜索請求如下:如何在Postman中發送elasticsearch多重搜索請求?
POST - http://localhost:9200/_msearch
content-type : x-www-form-urlencoded
body:
{"index":"accounts"}
{"query":{"bool":{"should":[{"match":{"owner.first_name":"Creeple"}}]}}}
不過,我得到以下錯誤:
{
"error": {
"root_cause": [
{
"type": "parse_exception",
"reason": "Failed to derive xcontent"
}
],
"type": "parse_exception",
"reason": "Failed to derive xcontent"
},
"status": 400
}
需要注意的是,如果我執行通過我的發揮同樣的請求代碼,結果成功提取。
WS.url("localhost:9200/_msearch").withHeaders("Content-type" -> "application/x-www-form-urlencoded").post(query)
不知道這是否是問題,但msearch是GET和POST不 – Amityo