Mapper for [date] conflicts with existing mapper:\n\tCannot update parameter [format] from [yyyyMMdd HH:mm:ss||yyyyMMdd||epoch_millis] to [strict_date_optional_time||epoch_millis]
PUT?http://127.0.0.1:9200/people/man/1
{
????"name":?"wali",
????"country":?"china",
????"age":?29,
????"date":?"1988-03-10"
}報錯
{
????"error":?{
????????"root_cause":?[
????????????{
????????????????"type":?"illegal_argument_exception",
????????????????"reason":?"Mapper?for?[date]?conflicts?with?existing?mapper:\n\tCannot?update?parameter?[format]?from?[yyyyMMdd?HH:mm:ss||yyyyMMdd||epoch_millis]?to?[strict_date_optional_time||epoch_millis]"
????????????}
????????],
????????"type":?"illegal_argument_exception",
????????"reason":?"Mapper?for?[date]?conflicts?with?existing?mapper:\n\tCannot?update?parameter?[format]?from?[yyyyMMdd?HH:mm:ss||yyyyMMdd||epoch_millis]?to?[strict_date_optional_time||epoch_millis]"
????},
????"status":?400
}
2021-07-05
format 的格式是:[yyyyMMdd?HH:mm:ss||yyyyMMdd||epoch_millis]
傳入的參數格式是:
"date":?"1988-03-10"應該是兩者格式不匹配造成報錯,要么修改下傳入的參數,要么修改下format的格式