I get the java.lang.NoSuchMethodError for org.elasticsearch.action.support.IndicesOptions.ignoreThrottled(), when I execute the the line client.search(searchRequest, RequestOptions.DEFAULT); in the following code. I am using the Elasticsearch API version 7.3.0.
What should I do to correct the issue?
RestHighLevelClient client = new RestHighLevelClient(
RestClient.builder(
new HttpHost("localhost", 9200, "http"),
new HttpHost("localhost", 9201, "http")));
Exception in thread "main" java.lang.NoSuchMethodError: org.elasticsearch.action.support.IndicesOptions.ignoreThrottled()Z
at org.elasticsearch.client.RequestConverters$Params.withIndicesOptions(RequestConverters.java:966)
at org.elasticsearch.client.RequestConverters.addSearchRequestParams(RequestConverters.java:417)
at org.elasticsearch.client.RequestConverters.search(RequestConverters.java:404)
at org.elasticsearch.client.RestHighLevelClient.lambda$search$2(RestHighLevelClient.java:932)
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1450)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1424)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1394)
at org.elasticsearch.client.RestHighLevelClient.search(RestHighLevelClient.java:930)
at ElasticSearchService.BuildJson(ElasticSearchService.java:253)
at ElasticSearchService.searchLog(ElasticSearchService.java:40)
at Program.main(Program.java:27)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.