【发布时间】:2022-08-18 15:52:38
【问题描述】:
我想将具有长数据类型的字段 \'districId\' 转换为关键字/文本以进行通配符搜索。请指导我如何在弹性搜索中将数据类型从 long 转换为关键字/文本数据类型
PUT geoxingsite/_mapping
{
\"properties\": {
\"districtId\": {
\"type\": \"keyword\"
}
}
}
我在下面收到错误...
{
\"error\" : {
\"root_cause\" : [
{
\"type\" : \"illegal_argument_exception\",
\"reason\" : \"mapper [districtId] cannot be changed from type [long] to [keyword]\"
}
],
\"type\" : \"illegal_argument_exception\",
\"reason\" : \"mapper [districtId] cannot be changed from type [long] to [keyword]\"
},
\"status\" : 400
}
-
你能显示一个你想在
districtId上运行的通配符查询吗?
标签: javascript elasticsearch logstash