我可以知道部分字段在elasticsearch 2.2.0中不起作用的细节。我最近从elasticsearch 1.7.2升级到elasticsearch 2.2.0。在旧版本中,它正在运行但是在升级后结果不会出现并提高例外。
请为您的参考找到错误
{
"error": {
"root_cause": [
{
"type": "search_parse_exception",
"reason": "failed to parse search source. unknown search element [partial_fields]",
"line": 79,
"col": 4
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "candidates1",
"node": "tlFrZ6JKTOWJ6krrkRnhMw",
"reason": {
"type": "search_parse_exception",
"reason": "failed to parse search source. unknown search element [partial_fields]",
"line": 79,
"col": 4
}
}
]
},
"status": 400
}
答案 0 :(得分:2)
2.0中的部分字段have been removed,现在您应该使用source filtering代替。
只需将partial_fields
替换为_source
即可。