blob: 3225b53c3992ab5be20ede1d94c18042cde38dda (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
[[mapping-parent-field]]
=== `_parent`
The parent field mapping is defined on a child mapping, and points to
the parent type this child relates to. For example, in case of a `blog`
type and a `blog_tag` type child document, the mapping for `blog_tag`
should be:
[source,js]
--------------------------------------------------
{
"blog_tag" : {
"_parent" : {
"type" : "blog"
}
}
}
--------------------------------------------------
The mapping is automatically stored and indexed (meaning it can be
searched on using the `_parent` field notation).
|