做排序的时候报错了,那么怎么修改mapping数据呢
来源:14-10 elasticsearch的简单查询 - 2
l__eon
2017-05-06
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Fielddata is disabled on text fields by default. Set fielddata=true on [title] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory."
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "lagou",
"node": "DnHlWQpPQ0qd-ix5RWREsg",
"reason": {
"type": "illegal_argument_exception",
"reason": "Fielddata is disabled on text fields by default. Set fielddata=true on [title] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory."
}
}
],
"caused_by": {
"type": "illegal_argument_exception",
"reason": "Fielddata is disabled on text fields by default. Set fielddata=true on [title] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory."
}
},
"status": 400
1回答
-
bobby
2017-05-08
es中的mapping中某个字段一旦设置好了类型 就不能修改, 但是如果是新加字段是可以修改的, 最后如果必须要修改mapping, 只能删了mapping重新做, 然后你还需要将所有数据重新导入一次,你可以百度一下 网上有教程
00
相似问题