在数据入库es的时候,某一字段为object类型,而原数据也确实是json格式的,但却有一部分数据解析失败,报错:
"error" : {
"type" : "mapper_parsing_exception",
"reason" : "failed to parse",
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "Can't merge a non object mapping [matched_details.C03BT006] with an object mapping [matched_details.C03BT006]"
"error" : {
"type" : "mapper_parsing_exception",
"reason" : "failed to parse",
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "Can't merge a non object mapping [matched_details.C03BT006] with an object mapping [matched_details.C03BT006]"
9 个回复
kennywu76 - Wood
赞同来自:
对比一下成功的数据和失败的数据,matched_details.C03BT006 这个字段的格式是否有区别? 从报错看,就是部分数据的这个字段不是json object。
maiya
赞同来自:
childe
赞同来自:
little_heart - 攻城小师傅
赞同来自:
maiya
赞同来自:
数据格式:
{"id" : "123456789", "level" : "D", "matched_sources" : "a123", "black_data" : "b234", "black_class" : "c345", "black_type" : "d56778", "matched_details" : {"C03BT006": ["因为是敏感数据,所以把此处内容删除了,以此代替"]}}
报的错误为:
MapperParsingException[object mapping for [matched_details.C03BT006] tried to parse field [null] as object, but found a concrete value]
childe
赞同来自:
maiya
赞同来自:
childe
赞同来自:
maiya
赞同来自: