ElasticSearch 5.5 ParsingException [[sort]查询格式错误,查询名称后没有start_object]

时间:2017-08-17 08:33:50

标签: java elasticsearch-5

我有一个在Sense / Kibana Dev工具中运行的查询,在使用Java API-Transport Client执行时不运行

查询:

{\"sort\": [{\"_score\": {\"order\": \"desc\"}},{\"CREATED_DATE\": {\"order\": \"desc\"}}],\"query\": {\"bool\": {\"filter\": {\"bool\": {\"must\": []}},"+
"\"must\": {\"bool\": {\"should\": [{\"bool\": {\"should\": [{\"match_phrase_prefix\": {\"property\": \"value\"}}]}}]}}}},\"from\": 0,\"size\": 2000}

爪哇:

WrapperQueryBuilder builder = QueryBuilders.wrapperQuery(Query);

SearchRequestBuilder req = client.prepareSearch("myIndex").setTypes("myType").setQuery(builder);

MultiSearchResponse Res = client.prepareMultiSearch().add(req).get();

结果:

  

执行阶段[查询]失败,所有分片都失败;   ParsingException [[sort]查询格式错误,查询后没有start_object   名]

0 个答案:

没有答案