是按照https://elasticsearch.cn/book/ ... .html的例子发现报这个问题:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Fielddata is disabled on text fields by default. Set fielddata=true on [interests] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "megacorp",
"node": "3c9lKT50Q1iPmVTWnLw0Ig",
"reason": {
"type": "illegal_argument_exception",
"reason": "Fielddata is disabled on text fields by default. Set fielddata=true on [interests] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."
}
}
]
},
"status": 400
}
在这个网址找到一种解决方案:
https://www.elastic.co/guide/e ... .html
在PUT数据的时候加入 "fielddata": true
但是对于ES中的历史文档(未增加 "fielddata": true的文档)应该如何聚合?求各位大神指导
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Fielddata is disabled on text fields by default. Set fielddata=true on [interests] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "megacorp",
"node": "3c9lKT50Q1iPmVTWnLw0Ig",
"reason": {
"type": "illegal_argument_exception",
"reason": "Fielddata is disabled on text fields by default. Set fielddata=true on [interests] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."
}
}
]
},
"status": 400
}
在这个网址找到一种解决方案:
https://www.elastic.co/guide/e ... .html
在PUT数据的时候加入 "fielddata": true
但是对于ES中的历史文档(未增加 "fielddata": true的文档)应该如何聚合?求各位大神指导
0 个回复