Skip to content

Commit ff5c7f8

Browse files
authored
[DOCS] Reuse multi-level join warning (#82976) (#83094)
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. (cherry picked from commit d3fb014)
1 parent 6d541d9 commit ff5c7f8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/reference/mapping/types/parent-join.asciidoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ The `join` data type is a special field that creates
88
parent/child relation within documents of the same index.
99
The `relations` section defines a set of possible relations within the documents,
1010
each relation being a parent name and a child name.
11+
12+
// tag::multi-level-join-warning[]
13+
WARNING: We don't recommend using multiple levels of relations to replicate a
14+
relational model. Each level of relation adds an overhead at query time in terms
15+
of memory and computation. For better search performance, denormalize your data
16+
instead.
17+
// end::multi-level-join-warning[]
18+
1119
A parent/child relation can be defined as follows:
1220

1321
[source,console]
@@ -432,9 +440,7 @@ PUT my-index-000001
432440

433441
==== Multiple levels of parent join
434442

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

439445
Multiple levels of parent/child:
440446

0 commit comments

Comments
 (0)