我有一个在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 名]