Can not search with SearchRequest.allowPartialSearchResults() Exception


(Tung Nguyen Thanh) #1

I am using elasticsearch-rest-high-level-client 6.4.2 and I am facing this error.
The error comes from the following piece of code in RequestConverters class.
< if (searchRequest.allowPartialSearchResults() != null) {
params.putParam("allow_partial_search_results", Boolean.toString(searchRequest.allowPartialSearchResults()));
}/>

<
java.lang.NoSuchMethodError: org.elasticsearch.action.search.SearchRequest.allowPartialSearchResults()Ljava/lang/Boolean;
at org.elasticsearch.client.RequestConverters.addSearchRequestParams(RequestConverters.java:578) ~[elasticsearch-rest-high-level-client-6.4.2.jar:5.6.11]
at org.elasticsearch.client.RequestConverters.search(RequestConverters.java:561) ~[elasticsearch-rest-high-level-client-6.4.2.jar:5.6.11]
at org.elasticsearch.client.RestHighLevelClient$$Lambda$693/687700620.apply(Unknown Source) ~[na:na]
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1252) ~[elasticsearch-rest-high-level-client-6.4.2.jar:5.6.11]
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1240) ~[elasticsearch-rest-high-level-client-6.4.2.jar:5.6.11]
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1223) ~[elasticsearch-rest-high-level-client-6.4.2.jar:5.6.11]
at org.elasticsearch.client.RestHighLevelClient.search(RestHighLevelClient.java:741) ~[elasticsearch-rest-high-level-client-6.4.2.jar:5.6.11]
/>


(David Pilato) #2

It looks like to me that you have 2 versions in the class path (6.x and 5.x) which is causing this problem.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.