如何阅读和分析弹性搜索错误?

时间:2014-10-06 07:34:36

标签: elasticsearch

我是Elastic Search的新手,我很难阅读和分析它的错误。首先,我尝试使用JSON格式化程序格式化错误,但它仍然看起来像一团糟。你用特定的方式来格式化吗?之后,如何在这个巨大的错误文本中找到错误的原因?这是我的一个样本:

{
  "error": "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[CebklbvjR2ORQkaiUEm6eQ][rep][0]: SearchParseException[[rep][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [    {\r\n      \"query\": {\r\n        \"filtered\": {\r\n          \"query\": {\r\n            \"term\": {\r\n              \"language_id\": 28\r\n            }\r\n          },\r\n          \"filter\": {\r\n            \"and\": [\r\n              {\r\n                \"range\": {\r\n                  \"re_max\": {\r\n                    \"gt\": 100\r\n                  }\r\n                }\r\n              },\r\n              \"terms\": {\r\n                \"publihser_id\": [\r\n                  225,\r\n                  226,\r\n                  227\r\n                ]\r\n              }\r\n            }\r\n          ]\r\n        }\r\n      }\r\n    },\r\n    \"aggs\": {\r\n      \"stat_agg\": {\r\n        \"stats\": {\r\n          \"field\": \"re_max\"\r\n        }\r\n      }\r\n    }\r\n    }]]]; nested: QueryParsingException[[rep] Failed to parse]; nested: JsonParseException[Unexpected character (':' (code 58)): was expecting comma to separate ARRAY entries\n at [Source: [B@d78a10f; line: 18, column: 23]]; }{[CebklbvjR2ORQkaiUEm6eQ][rep][4]: SearchParseException[[rep][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [    {\r\n      \"query\": {\r\n        \"filtered\": {\r\n          \"query\": {\r\n            \"term\": {\r\n              \"language_id\": 28\r\n            }\r\n          },\r\n          \"filter\": {\r\n            \"and\": [\r\n              {\r\n                \"range\": {\r\n                  \"re_max\": {\r\n                    \"gt\": 100\r\n                  }\r\n                }\r\n              },\r\n              \"terms\": {\r\n                \"publihser_id\": [\r\n                  225,\r\n                  226,\r\n                  227\r\n                ]\r\n              }\r\n            }\r\n          ]\r\n        }\r\n      }\r\n    },\r\n    \"aggs\": {\r\n      \"stat_agg\": {\r\n        \"stats\": {\r\n          \"field\": \"re_max\"\r\n        }\r\n      }\r\n    }\r\n    }]]]; nested: QueryParsingException[[rep] Failed to parse]; nested: JsonParseException[Unexpected character (':' (code 58)): was expecting comma to separate ARRAY entries\n at [Source: [B@d78a10f; line: 18, column: 23]]; }{[CebklbvjR2ORQkaiUEm6eQ][rep][3]: SearchParseException[[rep][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [    {\r\n      \"query\": {\r\n        \"filtered\": {\r\n          \"query\": {\r\n            \"term\": {\r\n              \"language_id\": 28\r\n            }\r\n          },\r\n          \"filter\": {\r\n            \"and\": [\r\n              {\r\n                \"range\": {\r\n                  \"re_max\": {\r\n                    \"gt\": 100\r\n                  }\r\n                }\r\n              },\r\n              \"terms\": {\r\n                \"publihser_id\": [\r\n                  225,\r\n                  226,\r\n                  227\r\n                ]\r\n              }\r\n            }\r\n          ]\r\n        }\r\n      }\r\n    },\r\n    \"aggs\": {\r\n      \"stat_agg\": {\r\n        \"stats\": {\r\n          \"field\": \"re_max\"\r\n        }\r\n      }\r\n    }\r\n    }]]]; nested: QueryParsingException[[rep] Failed to parse]; nested: JsonParseException[Unexpected character (':' (code 58)): was expecting comma to separate ARRAY entries\n at [Source: [B@d78a10f; line: 18, column: 23]]; }{[CebklbvjR2ORQkaiUEm6eQ][rep][2]: SearchParseException[[rep][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [    {\r\n      \"query\": {\r\n        \"filtered\": {\r\n          \"query\": {\r\n            \"term\": {\r\n              \"language_id\": 28\r\n            }\r\n          },\r\n          \"filter\": {\r\n            \"and\": [\r\n              {\r\n                \"range\": {\r\n                  \"re_max\": {\r\n                    \"gt\": 100\r\n                  }\r\n                }\r\n              },\r\n              \"terms\": {\r\n                \"publihser_id\": [\r\n                  225,\r\n                  226,\r\n                  227\r\n                ]\r\n              }\r\n            }\r\n          ]\r\n        }\r\n      }\r\n    },\r\n    \"aggs\": {\r\n      \"stat_agg\": {\r\n        \"stats\": {\r\n          \"field\": \"re_max\"\r\n        }\r\n      }\r\n    }\r\n    }]]]; nested: QueryParsingException[[rep] Failed to parse]; nested: JsonParseException[Unexpected character (':' (code 58)): was expecting comma to separate ARRAY entries\n at [Source: [B@d78a10f; line: 18, column: 23]]; }{[CebklbvjR2ORQkaiUEm6eQ][rep][1]: SearchParseException[[rep][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [    {\r\n      \"query\": {\r\n        \"filtered\": {\r\n          \"query\": {\r\n            \"term\": {\r\n              \"language_id\": 28\r\n            }\r\n          },\r\n          \"filter\": {\r\n            \"and\": [\r\n              {\r\n                \"range\": {\r\n                  \"re_max\": {\r\n                    \"gt\": 100\r\n                  }\r\n                }\r\n              },\r\n              \"terms\": {\r\n                \"publihser_id\": [\r\n                  225,\r\n                  226,\r\n                  227\r\n                ]\r\n              }\r\n            }\r\n          ]\r\n        }\r\n      }\r\n    },\r\n    \"aggs\": {\r\n      \"stat_agg\": {\r\n        \"stats\": {\r\n          \"field\": \"re_max\"\r\n        }\r\n      }\r\n    }\r\n    }]]]; nested: QueryParsingException[[rep] Failed to parse]; nested: JsonParseException[Unexpected character (':' (code 58)): was expecting comma to separate ARRAY entries\n at [Source: [B@d78a10f; line: 18, column: 23]]; }]",
  "status": 400
}

0 个答案:

没有答案