Es问题汇总

编程

1.索引类型为Date问题

"activitytime": {

"type": "date",

"format": "epoch_second"

}

报错:

message [ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=failed to parse field [activitytime] of type [date] in document with id "4689544955"]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Invalid format: ""]];]

Es原始数据:

"idx_facultyid" : "FacultyId_1006000",

"activitytime" : null,

"mainfacultyrank" : "2537",

本次更新数据:

"idx_facultyid" : "FacultyId_1006000",

"activitytime" : "",

"mainfacultyrank" : "2537"

解释:由于mapping的activitytime字段类型为date,当更新的数据为“”时,会报错。

总结:date类型的字段,禁止传""

 

 

 

 

 

以上是 Es问题汇总 的全部内容, 来源链接: utcz.com/z/511554.html

回到顶部