# Error with opensearch java client getting index information

**URL:** <https://forum.opensearch.org/t/error-with-opensearch-java-client-getting-index-information/13871>\
**Category:** OpenSearch Client Libraries\
**Tags:** opensearch-java\
**Created:** [April 10, 2023, 1:16pm UTC](https://forum.opensearch.org/t/error-with-opensearch-java-client-getting-index-information/13871 "2023-04-10T13:16:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![leonardo89](https://avatars.discourse-cdn.com/v4/letter/l/e5b9ba/32.png) [@leonardo89](https://forum.opensearch.org/u/leonardo89)\
**Post date:** [April 10, 2023, 1:16pm UTC](https://forum.opensearch.org/t/error-with-opensearch-java-client-getting-index-information/13871/1 "2023-04-10T13:16:47Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):

```auto
<dependency>
    <groupId>org.opensearch.client</groupId>
    <artifactId>opensearch-rest-client</artifactId>
    <version>2.6.0</version>
</dependency>
<dependency>
    <groupId>org.opensearch.client</groupId>
    <artifactId>opensearch-java</artifactId>
    <version>2.3.0</version>
</dependency>

```

**Describe the issue** :  
creationDate and creationDateString are null. Why?

**Relevant Logs or Screenshots** :

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/e/e3e152f18c4f6ca00c112b18ca7c4fd6e0220456.png)

---

<div class="post-metadata">

**Author:** ![reta](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@reta](https://forum.opensearch.org/u/reta)\
**Post date:** [April 10, 2023, 2:08pm UTC](https://forum.opensearch.org/t/error-with-opensearch-java-client-getting-index-information/13871/2 "2023-04-10T14:08:49Z")

</div>

@leonardo89 please check this issue [1] and documentation [2] how to ask for additional headers (including creation date).

[1] [[FEATURE] Add capability to cat indices with column names · Issue #388 · opensearch-project/opensearch-java · GitHub](https://github.com/opensearch-project/opensearch-java/issues/388)  
[2] [opensearch-java/USER\_GUIDE.md at main · opensearch-project/opensearch-java · GitHub](https://github.com/opensearch-project/opensearch-java/blob/main/USER_GUIDE.md#cat-indices)

---

<div class="post-metadata">

**Author:** ![leonardo89](https://avatars.discourse-cdn.com/v4/letter/l/e5b9ba/32.png) [@leonardo89](https://forum.opensearch.org/u/leonardo89)\
**Post date:** [April 10, 2023, 8:11pm UTC](https://forum.opensearch.org/t/error-with-opensearch-java-client-getting-index-information/13871/3 "2023-04-10T20:11:25Z")

</div>

Hi @reta, thanks for your reply. I checked the links you sent me and saw a merged PR to add headers on cat requests. I’m using the last version of the OpenSearch Java client, and I don’t see the header method from the second link.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/e/eb267d8de100a2d0d103b0b38b8c2e8735f412f1.png)

---

<div class="post-metadata">

**Author:** ![reta](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@reta](https://forum.opensearch.org/u/reta)\
**Post date:** [April 10, 2023, 8:43pm UTC](https://forum.opensearch.org/t/error-with-opensearch-java-client-getting-index-information/13871/4 "2023-04-10T20:43:29Z")

</div>

My apologies @leonardo89 , the change will be available in the next release [1], I mistakenly thought it made it to 2.3.0.

[1] [[RELEASE] Release v2.3.1 · Issue #426 · opensearch-project/opensearch-java · GitHub](https://github.com/opensearch-project/opensearch-java/issues/426)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [June 9, 2023, 8:43pm UTC](https://forum.opensearch.org/t/error-with-opensearch-java-client-getting-index-information/13871/5 "2023-06-09T20:43:44Z")

</div>

Closed on June 9, 2023, 8:43pm UTC

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