Mappings --------- `Mappings API `_ `Mappings reference `_ `Intro to Mappings in the Guide `_ `Types and Mappings in the Guide `_ Example mapping for a ``tweet`` doctype:: { "tweet" : { "properties" : { "message" : { "type" : "string", "store" : true, "index" : "analyzed", "null_value" : "na" }, "user" : { "type" : "string", "index" : "not_analyzed", "norms" : { "enabled" : false } }, "postDate" : {"type" : "date"}, "priority" : {"type" : "integer"}, "rank" : {"type" : "float"} } } } The string type ~~~~~~~~~~~~~~~ The string type is analyzed as full text by default. `String type reference `_ includes all the possible attributes. The number type ~~~~~~~~~~~~~~~ `Number type reference `_ The date type ~~~~~~~~~~~~~ `Date type reference `_ The boolean type ~~~~~~~~~~~~~~~~ `Boolean type reference `_ and it's ``boolean`` not ``Boolean``. Multi fields ~~~~~~~~~~~~ `Multi fields reference `_ You can store the same source field in several index fields, analyzed differently. Object type ~~~~~~~~~~~ `Object Type Ref `_ You can define a `field` to contain other fields. Root object type ~~~~~~~~~~~~~~~~ `Root object type ref `_ `Root object in guide `_ - better The top-level doc type in a mapping is also an object type, but has some special characteristics. For example, you can set the default analyzers that fields without an explicit analyzer will use. You can also turn off dynamic mapping for a doctype, though the Root object type ref doesn't mention this. See `Dynamic mapping `_. You can even turn it back on for one field. Example:: { "my_type": { "dynamic": "strict", "properties": { ... "stash": { "type": "object", "dynamic": True } } }