# How to get document by id (Get API) on a time series multi indexes environment?

**URL:** https://discuss.elastic.co/t/how-to-get-document-by-id-get-api-on-a-time-series-multi-indexes-environment/103044
**Category:** Elasticsearch
**Created:** [October 6, 2017, 4:06pm UTC](https://discuss.elastic.co/t/how-to-get-document-by-id-get-api-on-a-time-series-multi-indexes-environment/103044 "2017-10-06T16:06:09Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![elia.palme](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elia.palme/32/22839_2.png) [@elia.palme](https://discuss.elastic.co/u/elia.palme)
#### Post date: [October 7, 2017, 9:10am UTC](https://discuss.elastic.co/t/how-to-get-document-by-id-get-api-on-a-time-series-multi-indexes-environment/103044/7 "2017-10-07T09:10:31Z")

</div>

Unfortunately this API is not supported by the Java client. I probably need to use the ClusterStateRequest as explained in this [discussion](https://discuss.elastic.co/t/how-to-do--cat-indices-index-name-with-reg-ex-in-java/79936).

Somehow I feel this is getting over complicated.  
**Doing a realtime lookup for a unique id across multiple indices (time series) sounds like a common use case.**

Am I miss using Elasticsearch or is my set-up wrong? Is there a better way than getting all indices names and running a Multi Get to achieve this?

---

_[View the full topic](https://discuss.elastic.co/t/how-to-get-document-by-id-get-api-on-a-time-series-multi-indexes-environment/103044)._
