Document strict dynamic type mapping.

This commit is contained in:
Matt Weber 2013-10-10 11:17:49 -07:00
parent f749db26e8
commit 1e0a834c68
1 changed files with 21 additions and 1 deletions

View File

@ -31,7 +31,27 @@ different location). It can also be explicitly set using the
The dynamic creation of mappings for unmapped types can be completely
disabled by setting `index.mapper.dynamic` to `false`.
As an example, here is how we can change the default
The dynamic creation of fields within a type can be completely
disabled by setting the `dynamic` property of the type to `strict`.
Here is a <<indices-put-mapping,Put Mapping>> example that
disables dynamic field creation for a `tweet`:
[source,js]
--------------------------------------------------
$ curl -XPUT 'http://localhost:9200/twitter/tweet/_mapping' -d '
{
"tweet" : {
"dynamic": "strict",
"properties" : {
"message" : {"type" : "string", "store" : "yes"}
}
}
}
'
--------------------------------------------------
Here is how we can change the default
<<mapping-date-format,date_formats>> used in the
root and inner object types: