Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions docs/reference/mapping/types/parent-join.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ The `join` data type is a special field that creates
parent/child relation within documents of the same index.
The `relations` section defines a set of possible relations within the documents,
each relation being a parent name and a child name.

// tag::multi-level-join-warning[]
WARNING: We don't recommend using multiple levels of relations to replicate a
relational model. Each level of relation adds an overhead at query time in terms
of memory and computation. For better search performance, denormalize your data
instead.
// end::multi-level-join-warning[]

A parent/child relation can be defined as follows:

[source,console]
Expand Down Expand Up @@ -426,9 +434,7 @@ PUT my-index-000001

==== Multiple levels of parent join

WARNING: Using multiple levels of relations to replicate a relational model is not recommended.
Each level of relation adds an overhead at query time in terms of memory and computation.
You should de-normalize your data if you care about performance.
include::parent-join.asciidoc[tag=multi-level-join-warning]

Multiple levels of parent/child:

Expand Down