# New JAVA API Documentation

**URL:** <https://discuss.elastic.co/t/new-java-api-documentation/299559>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [March 13, 2022, 8:52am UTC](https://discuss.elastic.co/t/new-java-api-documentation/299559 "2022-03-13T08:52:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![willypol](https://avatars.discourse-cdn.com/v4/letter/w/dbc845/32.png) [@willypol](https://discuss.elastic.co/u/willypol)\
**Post date:** [March 13, 2022, 8:52am UTC](https://discuss.elastic.co/t/new-java-api-documentation/299559/1 "2022-03-13T08:52:15Z")

</div>

Hello, first of all congratulations on the new version of Elastic. A month ago we were translating a java software that uses Elasticsearch. We switched to the new Java API (with very poor documentation) and it took a lot of effort. What has been our surprise, going from 7.17 to 8.1, things have changed again. Do you plan to improve the documentation to be able to use it? Can you help me with the change that has occurred in the UpdateOperation?

**JAVA API 7.17**  
The update operation accepts the T document.

```auto
...
UpdateOperation.Builder<T> b = new UpdateOperation.Builder<>();
operations.add(new BulkOperation(b.document(doc).index(index).id(id).build()));
...

```

**JAVA API 8.1**  
The update operation needs TDocument, TPartialDocument and I don't know how it uses.  
The T document builder method don't exists, only tDocumentSerializer or tPartialDocumentSerializer but I don't know hoy use it.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 17, 2022, 9:59am UTC](https://discuss.elastic.co/t/new-java-api-documentation/299559/2 "2022-03-17T09:59:07Z")

</div>

Documention is currently one of the biggest priorities for the new Java Client. See [Issues · elastic/elasticsearch-java · GitHub](https://github.com/elastic/elasticsearch-java/issues?q=is%3Aopen+is%3Aissue+label%3A%3Edocumentation)

Regarding your second question: Maybe this test snippet helps? [elasticsearch-java/RequestTest.java at main · elastic/elasticsearch-java · GitHub](https://github.com/elastic/elasticsearch-java/blob/main/java-client/src/test/java/co/elastic/clients/elasticsearch/end_to_end/RequestTest.java#L209-L247)

---

<div class="post-metadata">

**Author:** ![willypol](https://avatars.discourse-cdn.com/v4/letter/w/dbc845/32.png) [@willypol](https://discuss.elastic.co/u/willypol)\
**Post date:** [March 18, 2022, 8:33am UTC](https://discuss.elastic.co/t/new-java-api-documentation/299559/3 "2022-03-18T08:33:54Z")

</div>

Thanks a lot! I will follow the links!

---

<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:** [April 15, 2022, 8:34am UTC](https://discuss.elastic.co/t/new-java-api-documentation/299559/4 "2022-04-15T08:34:38Z")

</div>

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