Json 对象映射[位置]可以';不能从嵌套更改为非嵌套 步骤1:
放 得到Json 对象映射[位置]可以';不能从嵌套更改为非嵌套 步骤1:,json,elasticsearch,Json,elasticsearch,放 得到 插入数据 职位 答复: {"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[node-1][10.194.153.161:9300][indices:data/write/index[p]]"}],"type":"illegal_argument_exception","reason":"object mapping [locations] can't be changed from neste
{"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[node-1][10.194.153.161:9300][indices:data/write/index[p]]"}],"type":"illegal_argument_exception","reason":"object mapping [locations] can't be changed from nested to non-nested"},"status":400}
已尝试使用不同的数据集,但没有成功,数据上会出现什么错误?您的第三个命令不正确,它没有在正确的映射类型上运行,并且它尝试创建一个名为
prof
的新映射类型,其中包含一个非嵌套的位置
字段,它与同一索引中的hProvider
映射类型中的嵌套类型冲突
将其更改为:
POST http://localhost:9200/hindex/hProvider/1/?_create
^
|
change this
{
"iPid" : "xyz",
"pType" : "HealthCareProfessional",
"pInfo": {
"businessName" : "hdata",
"firstName" : "Dawoods",
"dob" : "11/18/1975",
"gender" : "male"
},
"locations" : [
{
"addressInfo" : { "city" : "Olney", "county" : "UnitedStates" }
},
{
"addressInfo" : { "city" : "Rivers", "county" : "United States" }
}
]
}
{"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[node-1][10.194.153.161:9300][indices:data/write/index[p]]"}],"type":"illegal_argument_exception","reason":"object mapping [locations] can't be changed from nested to non-nested"},"status":400}
POST http://localhost:9200/hindex/hProvider/1/?_create
^
|
change this