我試圖張貼_bulk
後到彈性搜索,但它拋出:彈性體積錯誤:無法解析
{
"took": 1,
"errors": true,
"items": [
{
"index": {
"_index": "quick",
"_type": "parts",
"_id": "ACI250-2016",
"status": 400,
"error": {
"type": "mapper_parsing_exception",
"reason": "failed to parse [part]",
"caused_by": {
"type": "number_format_exception",
"reason": "For input string: \"250-2016\""
}
}
}
}
]
}
這裏就是我試圖發佈:
POST _bulk
{"index":{"_index":"quick","_type":"parts","_id":"ACI250-2016"}}
{"eMfg":"ACI","part":"250-2016"}
而地圖是:
{
"quick": {
"mappings": {
"parts": {
"properties": {
"app": {
"type": "string"
},
"eMfg": {
"type": "string"
},
"fPart": {
"type": "long"
},
"oPart": {
"type": "string"
},
"ofPart": {
"type": "string"
},
"part": {
"type": "long"
},
"price": {
"type": "double"
},
"title": {
"type": "string"
}
}
}
}
}
}
當用'GET/quick/_mapping'檢索映射時,你會得到什麼? 'part'可能是你的映射中的一個數字,你試圖給它一個字符串。 – Val
字段部分的映射是什麼? – ChintanShah25
你去了哪裏:'part'有'long'類型,你正在嘗試發送''250-2016''。原因可能是你在某個時候發送了一個文檔,其中一部分是一個數字,並且映射是在那個時候創建的。 – Val