Codeigniter 从';更新字段类型;日期';至';字符串';弹性搜索
我不熟悉Elasticsearch。我创建了一个包含很少子类型的索引Codeigniter 从';更新字段类型;日期';至';字符串';弹性搜索,codeigniter,
elasticsearch,postman,Codeigniter,
elasticsearch,Postman,我不熟悉Elasticsearch。我创建了一个包含很少子类型的索引 { "rkb_search_v3": { "mappings": { "event": { "properties": { "description": { "type": "string" } "start_date": {
{
"rkb_search_v3": {
"mappings": {
"event": {
"properties": {
"description": {
"type": "string"
}
"start_date": {
"type": "date",
"format": "dateOptionalTime"
},
"title": {
"type": "string"
}
}
}
}
}
}
我想将start_date
type更新为string,因为我无法搜索它,它会给出错误[error]=>SearchPhaseExecutionException[Failed to execute phase[query],所有碎片都失败;碎片失败{[4vaj1zhkssayid7rz6ciw][rkb_search_v3][0]:SearchParseException[[rkb_search_search_v3][0]:from[-1],size[100]
我正试图通过以下方法使用postman更新它
PUT localhost:9200/rkb\u search\u v3/\u mapping/event
{
"properties": {
"start_date": {
"type": "string"
}
}
}
}
但它没有更新。请帮助
注意:事件类型中有索引数据。如果字段已经有数据,则不能将其从字符串更改为日期,您需要重新索引所有数据。使用ES插件是一种很好的方法
以防万一,在没有数据的情况下,我也无法更新。你能告诉我你在这里解决的问题不正确吗。
start\u date
应该是date
类型。你能发布失败的查询吗?你应该尝试在这里修复查询,而不是索引。