【发布时间】:2017-05-19 23:56:44
【问题描述】:
在我的映射中有这个字段
"answer": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
我尝试执行这个聚合
"aggs": {
"answer": {
"terms": {
"field": "answer"
}
},
但我得到了这个错误
"type": "illegal_argument_exception",
"reason": "Fielddata is disabled on text fields by default. Set fielddata=true on [answer] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory."
我必须更改我的映射还是我使用了错误的聚合? (刚刚从 2.x 更新到 5.1)
【问题讨论】:
标签: elasticsearch mapping aggregation