# \[Springboot\]Rest High Level Client 7.0 can't use search method, missing org.elasticsearch.action.search.SearchRequest

**URL:** https://discuss.elastic.co/t/springboot-rest-high-level-client-7-0-cant-use-search-method-missing-org-elasticsearch-action-search-searchrequest/176898
**Category:** Elasticsearch
**Created:** [April 15, 2019, 11:56am UTC](https://discuss.elastic.co/t/springboot-rest-high-level-client-7-0-cant-use-search-method-missing-org-elasticsearch-action-search-searchrequest/176898 "2019-04-15T11:56:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![LinJIngYun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/linjingyun/32/44151_2.png) [@LinJIngYun](https://discuss.elastic.co/u/LinJIngYun)
#### Post date: [April 15, 2019, 11:56am UTC](https://discuss.elastic.co/t/springboot-rest-high-level-client-7-0-cant-use-search-method-missing-org-elasticsearch-action-search-searchrequest/176898/1 "2019-04-15T11:56:09Z")

</div>

> <https://github.com/elastic/elasticsearch/issues/41189>

  
I use Elasticsearch 7.0 (Latest Release) fresh new installing scratch without any upgrade from previous version. But I confront the problem when I try to use searching method.  
It said that can't find org.elasticsearch.action.search.SearchRequest.  
Spring Boot: 2.1.3.  
Elasticsearch: 7.0  
[https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-getting-started-maven.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-getting-started-maven.html)

I had try to build project in Docker it seem likely to have same problem again

 ![image](https://user-images.githubusercontent.com/25000903/56129709-0aff5f80-5fad-11e9-972c-ab9d79955c2c.png)  
But after I down grade my High Level Rest Client to 6.6.2 it seem work pretty good , no more missing org.elasticsearch.action.search.SearchRequest So if anyone have problem like this I suggest you downgrade the client version.

But still confuse about why maven repository keep pulling 6.4.3 version all the time even in the Docker build.

 ![](https://user-images.githubusercontent.com/25000903/56130055-130bcf00-5fae-11e9-972f-303b89b2e4ee.png)

 ![](https://user-images.githubusercontent.com/25000903/56130444-15baf400-5faf-11e9-8705-d3cd5da0fda7.png)

---

<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: [April 15, 2019, 1:34pm UTC](https://discuss.elastic.co/t/springboot-rest-high-level-client-7-0-cant-use-search-method-missing-org-elasticsearch-action-search-searchrequest/176898/2 "2019-04-15T13:34:30Z")

</div>

When using springboot with  
elasticsearch, you need to be explicit with some transitive dependencies as SpringBoot declares a version 6.4...

Basically you can put this in your `pom.xml`:

```auto
<properties>
  <elasticsearch.version>7.0.0<elasticsearch.version>
</properties>

```

See documentation here: [https://docs.spring.io/spring-boot/docs/current/reference/html/howto-build.html#howto-customize-dependency-versions](https://docs.spring.io/spring-boot/docs/current/reference/html/howto-build.html#howto-customize-dependency-versions)

---

<div class="post-metadata">

### Author: ![LinJIngYun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/linjingyun/32/44151_2.png) [@LinJIngYun](https://discuss.elastic.co/u/LinJIngYun)
#### Post date: [April 15, 2019, 2:59pm UTC](https://discuss.elastic.co/t/springboot-rest-high-level-client-7-0-cant-use-search-method-missing-org-elasticsearch-action-search-searchrequest/176898/3 "2019-04-15T14:59:13Z")

</div>

Thank you very much you are my life saver !!!  
After add properties just like you said it work perfectly 🙂  
Thank you again !

---

<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: [May 13, 2019, 3:14pm UTC](https://discuss.elastic.co/t/springboot-rest-high-level-client-7-0-cant-use-search-method-missing-org-elasticsearch-action-search-searchrequest/176898/4 "2019-05-13T15:14:19Z")

</div>

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