Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Codeigniter 从';更新字段类型;日期';至';字符串';弹性搜索_Codeigniter_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch_Postman - Fatal编程技术网 elasticsearch,postman,Codeigniter,elasticsearch,Postman" /> elasticsearch,postman,Codeigniter,elasticsearch,Postman" />

Codeigniter 从';更新字段类型;日期';至';字符串';弹性搜索

Codeigniter 从';更新字段类型;日期';至';字符串';弹性搜索,codeigniter,elasticsearch,postman,Codeigniter,elasticsearch,Postman,我不熟悉Elasticsearch。我创建了一个包含很少子类型的索引 { "rkb_search_v3": { "mappings": { "event": { "properties": { "description": { "type": "string" } "start_date": {

我不熟悉Elasticsearch。我创建了一个包含很少子类型的索引

{
"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
类型。你能发布失败的查询吗?你应该尝试在这里修复查询,而不是索引。