Java: cannot find symbol class RestHighLevelClient

Following Java High Level REST Client Getting started documentation. Added to the POM.xml (in IntelliJ):


In the java file added:

    RestHighLevelClient client = new RestHighLevelClient(
                        new HttpHost("localhost", 9200, "http"),
                        new HttpHost("localhost", 9201, "http")));

on build getting error: java: cannot find symbol
symbol: class RestHighLevelClient

I should add that find ~/.m2 -name "elastic*" produces no results.

Try taking your IDE out of the equation and check if you can build and compile your project using maven first. if that works, either refresh your project or reopen in your IDE.

If it does not work via maven, can you share error messages?

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