summaryrefslogtreecommitdiff
path: root/docs/reference/mapping/meta.asciidoc
blob: 5cb0c14eaadd6c3cacf2a47a9ac479123a13e8e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[[mapping-meta]]
== Meta

Each mapping can have custom meta data associated with it. These are
simple storage elements that are simply persisted along with the mapping
and can be retrieved when fetching the mapping definition. The meta is
defined under the `_meta` element, for example:

[source,js]
--------------------------------------------------
{
    "tweet" : {
        "_meta" : {
            "attr1" : "value1",
            "attr2" : {
                "attr3" : "value3"
            }
        }
    }
}
--------------------------------------------------

Meta can be handy for example for client libraries that perform
serialization and deserialization to store its meta model (for example,
the class the document maps to).