# Can Is possible to know the name of available index on ES?

**URL:** <https://discuss.elastic.co/t/can-is-possible-to-know-the-name-of-available-index-on-es/5790>\
**Category:** Elasticsearch\
**Created:** [November 7, 2011, 9:31am UTC](https://discuss.elastic.co/t/can-is-possible-to-know-the-name-of-available-index-on-es/5790 "2011-11-07T09:31:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_4](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sam\_4](https://discuss.elastic.co/u/Sam_4)\
**Post date:** [November 7, 2011, 9:31am UTC](https://discuss.elastic.co/t/can-is-possible-to-know-the-name-of-available-index-on-es/5790/1 "2011-11-07T09:31:21Z")

</div>

Hi

I want to know the all available index name and type on elastic server  
using java api?

Thanks

---

<div class="post-metadata">

**Author:** ![Kun\_Niu](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@Kun\_Niu](https://discuss.elastic.co/u/Kun_Niu)\
**Post date:** [November 7, 2011, 9:46am UTC](https://discuss.elastic.co/t/can-is-possible-to-know-the-name-of-available-index-on-es/5790/2 "2011-11-07T09:46:30Z")

</div>

Admin client can help you to get all the indices on ES

> -----Original Message-----  
> From: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] On Behalf Of sam  
> Sent: 2011年11月7日 17:31  
> To: elasticsearch  
> Subject: can Is possible to know the name of available index on ES?
> 
> Hi
> 
> I want to know the all available index name and type on elastic server  
> using  
> java api?
> 
> Thanks

---

<div class="post-metadata">

**Author:** ![Sam\_4](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sam\_4](https://discuss.elastic.co/u/Sam_4)\
**Post date:** [November 7, 2011, 10:46am UTC](https://discuss.elastic.co/t/can-is-possible-to-know-the-name-of-available-index-on-es/5790/3 "2011-11-07T10:46:11Z")

</div>

Thanks for reply.can you elaborate which class method will do.

On Nov 7, 2:46 pm, "Kun Niu" [haoniu...@gmail.com](mailto:haoniu...@gmail.com) wrote:

> Admin clientcan help you to get all the indices on ES
> 
> > -----Original Message-----\> [From:elasticsearch@googlegroups.com](mailto:From:elasticsearch@googlegroups.com)\> [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)]On Behalf Of sam  
> > Sent: 2011年11月7日 17:31  
> > To: elasticsearch  
> > Subject: can Is possible to know the name of available index on ES?
> 
> > Hi
> 
> > I want to know the all available index name and type on elastic server  
> > using  
> > java api?
> 
> > Thanks

---

<div class="post-metadata">

**Author:** ![Jan\_Fiedler](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan_fiedler/32/2518_2.png) [@Jan\_Fiedler](https://discuss.elastic.co/u/Jan_Fiedler)\
**Post date:** [November 7, 2011, 11:59am UTC](https://discuss.elastic.co/t/can-is-possible-to-know-the-name-of-available-index-on-es/5790/4 "2011-11-07T11:59:31Z")

</div>

Take a look at the index status request[http://www.elasticsearch.org/guide/reference/api/admin-indices-status.html](http://www.elasticsearch.org/guide/reference/api/admin-indices-status.html).  
Its response basically gives you a map with the index status keyed by the  
index name. The corresponding Java API call would look like this:

IndicesStatusResponse r =  
client.admin().indices().prepareStatus().execute().actionGet()

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [November 9, 2011, 6:48am UTC](https://discuss.elastic.co/t/can-is-possible-to-know-the-name-of-available-index-on-es/5790/5 "2011-11-09T06:48:54Z")

</div>

Better to use the cluster state API, less overhead.  
(client.admin().cluster().prepareState()...)

On Mon, Nov 7, 2011 at 1:59 PM, Jan Fiedler [fiedler.jan@gmail.com](mailto:fiedler.jan@gmail.com) wrote:

> Take a look at the index status request[http://www.elasticsearch.org/guide/reference/api/admin-indices-status.html](http://www.elasticsearch.org/guide/reference/api/admin-indices-status.html).  
> Its response basically gives you a map with the index status keyed by the  
> index name. The corresponding Java API call would look like this:
> 
> IndicesStatusResponse r =  
> client.admin().indices().prepareStatus().execute().actionGet()

---

<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:** [July 6, 2017, 3:49am UTC](https://discuss.elastic.co/t/can-is-possible-to-know-the-name-of-available-index-on-es/5790/6 "2017-07-06T03:49:26Z")

</div>


