Using ES 6.3.0: Where is the RequestOptions class?


(garyM) #1

I am trying to migrate my code to the ES version 6.30. According to
this documentation page:

... In my java class I am to instantiate a IndexResponse opject like this:
IndexResponse response = client.index(request, RequestOptions.DEFAULT);

The documentation states that the RequestOptions is a member of the low level client.

I am using Maven to gather all the necessary ES dependencies. I have included the dependency for the low level client in my POM with:
org.elasticsearch.client:elasticsearch-rest-client - version 6.3.0 - the latest in the Maven repository. However there is no RequestOptions class in this package.

Where can I find the RequestOptions class that I need to create a IndexResponse statement?

Thank you for your time.


(BradVido) #3

i have the same issue. it seems that class doesn't exist


(garyM) #4

I don't know why this is not part of the ES V6.3.0 download however I did find it here:


(David Pilato) #6

The documentation you are looking at is for coming major versions, like 6.4.

In 6.3, instead of

IndexResponse response = client.index(request, RequestOptions.DEFAULT);

write:

IndexResponse response = client.index(request);

See documentation for 6.3.0: https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.3/_changing_the_application_8217_s_code.html


(system) #7

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