| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 | [[indices-put-mapping]]== Put MappingThe put mapping API allows to register specific mapping definition for aspecific type.[source,js]--------------------------------------------------$ curl -XPUT 'http://localhost:9200/twitter/_mapping/tweet' -d '{    "tweet" : {        "properties" : {            "message" : {"type" : "string", "store" : true }        }    }}'--------------------------------------------------The above example creates a mapping called `tweet` within the `twitter`index. The mapping simply defines that the `message` field should bestored (by default, fields are not stored, just indexed) so we canretrieve it later on using selective loading.More information on how to define type mappings can be found in the<<mapping,mapping>> section.[float][[merging-conflicts]]=== Merging & ConflictsWhen an existing mapping already exists under the given type, the twomapping definitions, the one already defined, and the new ones aremerged. If there are conflicts then the update will be rejected.The definition of conflict is really dependent on the type merged, butin general, if a different core type is defined, it is considered as aconflict. New mapping definitions can be added to object types, and coretype mappings can be upgraded by specifying multi fields on a core type.[float][[put-mapping-multi-index]]=== Multi IndexThe put mapping API can be applied to more than one index with a singlecall, or even on `_all` the indices.[source,js]--------------------------------------------------$ curl -XPUT 'http://localhost:9200/kimchy,elasticsearch/_mapping/tweet' -d '{    "tweet" : {        "properties" : {            "message" : {"type" : "string", "store" : true }        }    }}'--------------------------------------------------All options:[source,js]--------------------------------------------------PUT /{index}/_mapping/{type}--------------------------------------------------where[horizontal]`{index}`:: `blank | * | _all | glob pattern | name1, name2, …``{type}`:: Name of the type to add. Must be the name of the type defined in the body.Instead of `_mapping` you can also use the plural `_mappings`.
 |