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

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

-----Original Message-----
From: 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

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

On Nov 7, 2:46 pm, "Kun Niu" haoniu...@gmail.com wrote:

Admin clientcan help you to get all the indices on ES

-----Original Message-----> From: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

Take a look at the index status requesthttp://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()

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 wrote:

Take a look at the index status requesthttp://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()