elasticsearch2.2.0中的部分字段不起作用?

时间:2016-04-17 03:14:32

标签: elasticsearch

我可以知道部分字段在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
}

1 个答案:

答案 0 :(得分:2)

2.0中的部分字段have been removed,现在您应该使用source filtering代替。

只需将partial_fields替换为_source即可。