All the REST APIs use the Java APIs internally. The get mapping is simply using the cluster state API, to get the relevant index information, which also has the mappings there.
On Tuesday, December 7, 2010 at 11:37 PM, John Chang wrote:
Is there a java api for getting the mappings? Something like a java api that
does this:
http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/indices/get_mapping/I want to have my service start up and query the mappings; if they are not
as expected, I want the service to log errors and shutdown. We've had
problems with services coming up and they are not running against the
mappings they thought they had.If what I am looking for does not exist, could you give any other advice on
how to sanity check the mappings upon application startup? Or perhaps other
programming/operational tips on making sure the correct mappings are in
place?Thanks.
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Java-API-for-mapping-tp1906936p2036369.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.