# Unique Index names using elastic rest client

**URL:** <https://discuss.elastic.co/t/unique-index-names-using-elastic-rest-client/120344>\
**Category:** Elasticsearch\
**Created:** [February 18, 2018, 11:00am UTC](https://discuss.elastic.co/t/unique-index-names-using-elastic-rest-client/120344 "2018-02-18T11:00:49Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [February 18, 2018, 6:18pm UTC](https://discuss.elastic.co/t/unique-index-names-using-elastic-rest-client/120344/7 "2018-02-18T18:18:40Z")

</div>

Read [this](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and specifically the "Also be patient" part.

I did not say to run an agg on `hits.hits._index` bit on `_index`.

Alain, try first with the dev console, and make it work. Then convert to Java code.

---

_[View the full topic](https://discuss.elastic.co/t/unique-index-names-using-elastic-rest-client/120344)._
