0
我想索引一個文檔在elasticsearch中。我所使用的json來自正在從XML轉換爲JSON的文檔。這是有效的JSON。看起來像這樣:索引json與彈性搜索中的json值
{
"shortcasename": {
"_attributes": {
"party1": "People",
"party2": "Johnson"
},
"_children": [
"People",
{
"connector": {
"_attributes": {
"normval": "v"
},
"_children": [
" v. "
]
}
},
"Johnson"
]
}
}
Elasitcsearch似乎有一個shortcasename._children問題。我得到的錯誤是:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "failed to parse"
}
],
"type": "mapper_parsing_exception",
"reason": "failed to parse",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "mapper [shortcasename._children] of different type, current_type [string], merged_type [ObjectMapper]"
}
},
"status": 400
}
有沒有辦法讓json被索引的方式呢?
有沒有這樣的運氣? – Val