How many index type exist in given index using java API?

Hi

I have one index and multiple index type, I want to know whether index
type is available or not index,also how can i get the list of all
available index type list.

Thanks

You can get the list of all available types for an index using Get Mapping
APIhttp://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping.html
.

On Wednesday, April 25, 2012 2:27:47 AM UTC-4, sam wrote:

Hi

I have one index and multiple index type, I want to know whether index
type is available or not index,also how can i get the list of all
available index type list.

Thanks

Thanks fro reply.i have following code to get the all available list :

ClusterStateResponse clusterResponse =
client.admin().cluster().prepareState().execute().actionGet();
ImmutableMap<String, MappingMetaData> mappings =
clusterResponse.state().getMetaData().index(indexName).getMappings();
boolean containsKey = mappings.containsKey(indexType);

On Wednesday, April 25, 2012 12:43:17 PM UTC+5:30, Igor Motov wrote:

You can get the list of all available types for an index using Get
Mapping APIhttp://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping.html
.

On Wednesday, April 25, 2012 2:27:47 AM UTC-4, sam wrote:

Hi

I have one index and multiple index type, I want to know whether index
type is available or not index,also how can i get the list of all
available index type list.

Thanks