获得报错如下:org.elasticsearch.client.ResponseException: GET http://localhost:9200/my_index/my_type/_search: HTTP/1.1 400 Bad Request
{"error":{"root_cause":[{"type":"parsing_exception","reason":"Unknown key for a START_OBJECT in [bool].","line":2,"col":12}],"type":"parsing_exception","reason":"Unknown key for a START_OBJECT in [bool].","line":2,"col":12},"status":400}
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:354)
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:343)
at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119)
3 个回复
wangjueying - Java攻城狮-ES爱好者
赞同来自: medcl
medcl - 今晚打老虎。
赞同来自:
wangjueying - Java攻城狮-ES爱好者
赞同来自:
HttpEntity entity = new NStringEntity(boolBuilder.toString(), ContentType.APPLICATION_JSON);
Response response=restClient.performRequest("GET", "/my_index/my_type/_search", Collections.<String, String>emptyMap(),entity);
获得报错如下:org.elasticsearch.client.ResponseException: GET http://localhost:9200/my_index/my_type/_search: HTTP/1.1 400 Bad Request
{"error":{"root_cause":[{"type":"parsing_exception","reason":"Unknown key for a START_OBJECT in [bool].","line":2,"col":12}],"type":"parsing_exception","reason":"Unknown key for a START_OBJECT in [bool].","line":2,"col":12},"status":400}
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:354)
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:343)
at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119)
(域名都配置好的)