Is there a simple way to get the mapping per index through java api?

We're in need of a simple interface where admins can see/modify and
set again the mappings for the indices.

Getting the mappings can be done through client.admin().cluster(). But
seems a bit convoluted to just get all the mappings in json format
through this way.

Can this be done easily? am I looking at the wrong place?

Cheers

The rest endpoint for get mapping uses the cluster state API (with some
filters), here is the code:
https://github.com/elasticsearch/elasticsearch/blob/master/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/indices/mapping/get/RestGetMappingAction.java
.

On Tue, Oct 4, 2011 at 5:59 PM, maverick mauricio.alarcon@gmail.com wrote:

We're in need of a simple interface where admins can see/modify and
set again the mappings for the indices.

Getting the mappings can be done through client.admin().cluster(). But
seems a bit convoluted to just get all the mappings in json format
through this way.

Can this be done easily? am I looking at the wrong place?

Cheers

Just perfect, Thanks Shay!

On Oct 4, 12:20 pm, Shay Banon kim...@gmail.com wrote:

The rest endpoint for get mapping uses the cluster state API (with some
filters), here is the code:https://github.com/elasticsearch/elasticsearch/blob/master/modules/el...
.

On Tue, Oct 4, 2011 at 5:59 PM, maverick mauricio.alar...@gmail.com wrote:

We're in need of a simple interface where admins can see/modify and
set again the mappings for the indices.

Getting the mappings can be done through client.admin().cluster(). But
seems a bit convoluted to just get all the mappings in json format
through this way.

Can this be done easily? am I looking at the wrong place?

Cheers