# Elasticsearch Java Client (elasticsearch-java) ready for production use?

**URL:** https://discuss.elastic.co/t/elasticsearch-java-client-elasticsearch-java-ready-for-production-use/284759
**Category:** Elasticsearch
**Tags:** language-clients
**Created:** [September 21, 2021, 7:45pm UTC](https://discuss.elastic.co/t/elasticsearch-java-client-elasticsearch-java-ready-for-production-use/284759 "2021-09-21T19:45:09Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![roytmana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roytmana/32/44855_2.png) [@roytmana](https://discuss.elastic.co/u/roytmana)
#### Post date: [September 21, 2021, 7:45pm UTC](https://discuss.elastic.co/t/elasticsearch-java-client-elasticsearch-java-ready-for-production-use/284759/1 "2021-09-21T19:45:09Z")

</div>

Hello,

We have been using low level rest client avoiding high level rest client because its dependencies on elastic server. I noticed that the high level client is being deprecated in favor of a new elasticsearch-java client.

Is it ready for production use or experimental? Is company committed to it long term?

Any docs or examples on its use? I managed to connect , create index and index few records with it.

Getting some errors trying to pass refresh=wait\_for = `.refresh(Json.createValue("wait_for"))` wait\_for is passed to elastic with extra "" maybe I pass JsonValue incorrectly - it is not obvious

---

<div class="post-metadata">

### Author: ![Alain\_Bod](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alain_bod/32/77345_2.png) [@Alain\_Bod](https://discuss.elastic.co/u/Alain_Bod)
#### Post date: [September 24, 2021, 9:34am UTC](https://discuss.elastic.co/t/elasticsearch-java-client-elasticsearch-java-ready-for-production-use/284759/2 "2021-09-24T09:34:00Z")

</div>

Hi, I've seen this depreciation warning for the 7.15 version of the high level client but can't find any documentation about its replacement. Where did you find the information you are referring to?  
Thank you,

---

<div class="post-metadata">

### Author: ![Jamshid](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@Jamshid](https://discuss.elastic.co/u/Jamshid)
#### Post date: [October 11, 2021, 3:58am UTC](https://discuss.elastic.co/t/elasticsearch-java-client-elasticsearch-java-ready-for-production-use/284759/3 "2021-10-11T03:58:14Z")

</div>

What the heck is going on with elasticsearch and its Java SDKs?

Where is the "new Java client"? It's not the "Java API" (Transport client?) right, because that's being deprecated:

> **[Preface | Java Transport Client (deprecated) \[7.15\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/java-api/7.15/java-api.html)**

> The `TransportClient` is deprecated in favour of the [Java High Level REST Client](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.15/java-rest-high.html) and will be removed in Elasticsearch 8.0.

That says it's deprecated in favor of the High Level REST client, which is itself now deprecated?!

> **[Java High Level REST Client | Java REST Client \[7.15\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.15/java-rest-high.html)**

> The High Level REST Client is deprecated in favour of the Java Client.

Does this just mean the low level REST client, or is there a secret new Java Client?

All I can find is this old 2016 blog which only confuses things more.

> **[Elasticsearch Java Clients](https://www.elastic.co/blog/state-of-the-official-elasticsearch-java-clients)**
>
> Java programmers have two choices when communicating with Elasticsearch: they can use either the REST API over HTTP, or the internal Java API used by Elasticsearch itself for node-to-node communication.

Maybe there is an ElasticON video that explains what's happening?

---

<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: [October 11, 2021, 5:03am UTC](https://discuss.elastic.co/t/elasticsearch-java-client-elasticsearch-java-ready-for-production-use/284759/4 "2021-10-11T05:03:19Z")

</div>

Have a look at [Elasticsearch Java API Client [7.x] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/index.html)

And

> **[GitHub - elastic/elasticsearch-java: Official Elasticsearch Java Client](https://github.com/elastic/elasticsearch-java)**
>
> Official Elasticsearch Java Client. Contribute to elastic/elasticsearch-java development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![ronchalant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ronchalant/32/3611_2.png) [@ronchalant](https://discuss.elastic.co/u/ronchalant)
#### Post date: [November 5, 2021, 1:19pm UTC](https://discuss.elastic.co/t/elasticsearch-java-client-elasticsearch-java-ready-for-production-use/284759/5 "2021-11-05T13:19:00Z")

</div>

I came here to look at this as we have been migrating off the transport client and onto the High Level REST Client, only now to see that it also is being deprecated?

And deprecated in favor of a client that is considered beta?

This is particularly discouraging. We are now faced with the choice of writing a solution to a deprecated client or a beta client that may still see significant changes before becoming final or even production ready.

---

<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: [November 5, 2021, 2:16pm UTC](https://discuss.elastic.co/t/elasticsearch-java-client-elasticsearch-java-ready-for-production-use/284759/6 "2021-11-05T14:16:40Z")

</div>

I agree that the situation is not ideal.

By deprecating the HL client we meant to warn the users (you) that something is in the making.

Sadly the new client is, well, very new and it can not be GA right now.

Fortunately the work to move from HL Client to the new one is not super hard.

But yes, situation is not ideal.

---

<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: [December 3, 2021, 2:17pm UTC](https://discuss.elastic.co/t/elasticsearch-java-client-elasticsearch-java-ready-for-production-use/284759/7 "2021-12-03T14:17:40Z")

</div>

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