# Using ES 6.3.0: Where is the RequestOptions class?

**URL:** <https://discuss.elastic.co/t/using-es-6-3-0-where-is-the-requestoptions-class/136758>\
**Category:** Elasticsearch\
**Created:** [June 20, 2018, 8:26pm UTC](https://discuss.elastic.co/t/using-es-6-3-0-where-is-the-requestoptions-class/136758 "2018-06-20T20:26:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmarshall56](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@gmarshall56](https://discuss.elastic.co/u/gmarshall56)\
**Post date:** [June 20, 2018, 8:26pm UTC](https://discuss.elastic.co/t/using-es-6-3-0-where-is-the-requestoptions-class/136758/1 "2018-06-20T20:26:10Z")

</div>

I am trying to migrate my code to the ES version 6.30. According to  
[this documentation page:](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.x/_changing_the_application_8217_s_code.html)

... 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.

---

<div class="post-metadata">

**Author:** ![BradVido](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bradvido/32/741_2.png) [@BradVido](https://discuss.elastic.co/u/BradVido)\
**Post date:** [July 1, 2018, 8:51pm UTC](https://discuss.elastic.co/t/using-es-6-3-0-where-is-the-requestoptions-class/136758/3 "2018-07-01T20:51:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gmarshall56](https://avatars.discourse-cdn.com/v4/letter/g/bbe5ce/32.png) [@gmarshall56](https://discuss.elastic.co/u/gmarshall56)\
**Post date:** [July 2, 2018, 12:51pm UTC](https://discuss.elastic.co/t/using-es-6-3-0-where-is-the-requestoptions-class/136758/4 "2018-07-02T12:51:26Z")

</div>

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

> **[elastic/elasticsearch](https://github.com/elastic/elasticsearch/tree/master/client/rest/src/main/java/org/elasticsearch/client)**
>
> elasticsearch - Open Source, Distributed, RESTful Search Engine

---

<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:** [July 2, 2018, 3:13pm UTC](https://discuss.elastic.co/t/using-es-6-3-0-where-is-the-requestoptions-class/136758/6 "2018-07-02T15:13:52Z")

</div>

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

In 6.3, instead of

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

```

write:

```auto
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](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.3/_changing_the_application_8217_s_code.html)

---

<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:** [July 30, 2018, 3:13pm UTC](https://discuss.elastic.co/t/using-es-6-3-0-where-is-the-requestoptions-class/136758/7 "2018-07-30T15:13:57Z")

</div>

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