[JAVA API] Retrieve all indexes

Hi all,
First of all I took a look and did not find the answer for my question.
Can anyone teach me how can I find all indexes from a cluster using the
JAVA API?
Thanks

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/adf8f2c2-311e-4732-8c5e-97835798e573%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hello Luan ,

There are many ways to do it -

Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9300));
GetSettingsRequest req = new GetSettingsRequest();;
GetSettingsResponse response =
client.admin().indices().getSettings(req).actionGet();
ImmutableOpenMap<String, Settings> settings = response.getIndexToSettings();
System.out.println("Indices are " + settings.keys());

Thanks
Vineeth

On Mon, Sep 15, 2014 at 4:52 PM, Luan Garrido lbgarrido89@gmail.com wrote:

Hi all,
First of all I took a look and did not find the answer for my question.
Can anyone teach me how can I find all indexes from a cluster using the
JAVA API?
Thanks

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/adf8f2c2-311e-4732-8c5e-97835798e573%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/adf8f2c2-311e-4732-8c5e-97835798e573%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGdPd5karShQcL%2Bp0VFfCKgM7tUzmWhdCGfjca3ah7YSedOfTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Thank you for your healp Vineeth

Em segunda-feira, 15 de setembro de 2014 08h22min40s UTC-3, Luan Garrido
escreveu:

Hi all,
First of all I took a look and did not find the answer for my question.
Can anyone teach me how can I find all indexes from a cluster using the
JAVA API?
Thanks

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/29528fd4-7f84-4a4a-b689-1b7665a4714b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vineeth, can you tell me how can I get the types of this index?
I tried:

GetMappingsResponse response =
this.client.admin().indices().prepareGetMappings(index).execute().actionGet();
for(ObjectCursor st : response.mappings().keys()){
System.out.println(st.value);
}
But it returned me the name of the index.

Thank you

Em segunda-feira, 15 de setembro de 2014 08h22min40s UTC-3, Luan Garrido
escreveu:

Hi all,
First of all I took a look and did not find the answer for my question.
Can anyone teach me how can I find all indexes from a cluster using the
JAVA API?
Thanks

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/960d95d7-1c21-43f3-b95f-98d6f2cf5e26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.