# Can not search with SearchRequest.allowPartialSearchResults() Exception

**URL:** <https://discuss.elastic.co/t/can-not-search-with-searchrequest-allowpartialsearchresults-exception/151743>\
**Category:** Elasticsearch\
**Created:** [October 10, 2018, 3:50am UTC](https://discuss.elastic.co/t/can-not-search-with-searchrequest-allowpartialsearchresults-exception/151743 "2018-10-10T03:50:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tung\_Nguyen\_Thanh](https://avatars.discourse-cdn.com/v4/letter/t/c5a1d2/32.png) [@Tung\_Nguyen\_Thanh](https://discuss.elastic.co/u/Tung_Nguyen_Thanh)\
**Post date:** [October 10, 2018, 3:50am UTC](https://discuss.elastic.co/t/can-not-search-with-searchrequest-allowpartialsearchresults-exception/151743/1 "2018-10-10T03:50:47Z")

</div>

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]  
/\>

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 10, 2018, 7:02am UTC](https://discuss.elastic.co/t/can-not-search-with-searchrequest-allowpartialsearchresults-exception/151743/2 "2018-10-10T07:02:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 7, 2018, 7:04am UTC](https://discuss.elastic.co/t/can-not-search-with-searchrequest-allowpartialsearchresults-exception/151743/3 "2018-11-07T07:04:11Z")

</div>

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