question: public PutIndexTemplateRequest mapping ( String type , XContentBuilder source ) { try { mappings . put ( type , source . string ( ) ) ; } catch ( IOException e ) { throw new IllegalArgumentException ( "Failed to build json for mapping request" , e ) ; } return this ; }
target:  Adds mapping that will be added when the index gets created.