身安不如心安,屋宽不如心宽 。

elasticsearch mapping如何修改?

Elasticsearch | 作者 jasonnullx | 发布于2016年09月23日 | 阅读数:11322

现在我想把url字段由not_analyzed改为analyzed,但是看了官方文档,好像不能修改,请问是否有方法能解决这个问题??"mappings": {
"data": {
"properties": {
"context": {
"type": "string"
},
"title": {
"type": "string"
},
"issuedate": {
"format": "strict_date_optional_time||epoch_millis",
"type": "date"
},
"url": {
"index": "not_analyzed",
"type": "string"
},
"crawldate": {
"format": "strict_date_optional_time||epoch_millis",
"type": "date"
}
}
已邀请:

yangruideyang

赞同来自:

你这个字段废了,重建索引或者用其他字段替代,或者用多字段

Will - 8

赞同来自:

不能修改已经存在的字段的mapping

xingoo

赞同来自:

推荐使用Pyes或者elasticsearch的reindex工具。支持把一个索引导出为另一个索引,这样就能重建mapping了。

novia - 1&0

赞同来自:

之前都是新建一个索引,然后将现有索引的数据导入过去

要回复问题请先登录注册