Java api for put mapping

Hi.
What I want is to read mapping from a file and set mapping for some
indextype using java.
Does this functionality exists now?
If yes can someone tell me how.
I looked at RestPutMappingAction.java but could not understand what
are its parameters.
Can somebody show me some working example?

Regards.

Check the preparePutMapping API on the Java client you get:
client.admin().indices().preparePutMapping(...)

On Tue, Jul 26, 2011 at 9:42 AM, nachiket bhagwat <nachiketbhagwat@gmail.com

wrote:

Hi.
What I want is to read mapping from a file and set mapping for some
indextype using java.
Does this functionality exists now?
If yes can someone tell me how.
I looked at RestPutMappingAction.java but could not understand what
are its parameters.
Can somebody show me some working example?

Regards.