Skip to content

Commit

Permalink
[DOCS] Reuse multi-level join warning (#82976)
Browse files Browse the repository at this point in the history
Updates and reuses a warning against creating multi-level `join` fields to make it more prominent.

The current warning is low on the page, where some users may not seeing until they've already begun mapping fields.

Closes #82818.
  • Loading branch information
jrodewig authored Jan 25, 2022
1 parent 7f81877 commit d3fb014
Showing 1 changed file with 9 additions and 3 deletions.
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

0 comments on commit d3fb014

Please sign in to comment.