File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed
Nest/Mapping/Types/Core/Join
Tests/ClientConcepts/HighLevel/Mapping Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Nest
4
4
{
5
- /// This does not extend from Union because its intended to be used on folk's _source's
6
- /// And the union serialization will bleed into their own JSON.NET serializer should they
7
- /// have one configured and then it will blow up because their contractresolver do not extend ours
8
- /// from which we can snoop ConnectionSettings.
9
- ///
10
- /// ContractJsonResolverAttribute works as well but I rather keep this class contained as much as possible
11
- ///
5
+ // This does not extend from Union because its intended to be used on folk's _source's
6
+ // And the union serialization will bleed into their own JSON.NET serializer should they
7
+ // have one configured and then it will blow up because their contractresolver do not extend ours
8
+ // from which we can snoop ConnectionSettings.
9
+ //
10
+ // ContractJsonResolverAttribute works as well but I rather keep this class contained as much as possible
11
+ /// <summary>
12
+ /// The field on which a parent-child relationship is joined
12
13
/// </summary>
13
14
[ ContractJsonConverter ( typeof ( JoinFieldJsonConverter ) ) ]
14
15
public class JoinField
Original file line number Diff line number Diff line change 12
12
13
13
namespace Tests . ClientConcepts . HighLevel . Mapping
14
14
{
15
- /**[[multi-fields ]]
15
+ /**[[parent-child-joins ]]
16
16
* === Parent Child joins using the join mapping
17
17
*
18
18
* Prior to Elasticsearch 6.x you could have multiple types in a single index. Through the special _parent field mapping of a given type
19
19
* one could create 1 to N relationship of parent => children documents. This worked because when indexing children you passed a
20
20
* `_parent` id which would act as the routing key making sure a parent and its (grand)children all lived on the same shard.
21
21
*
22
- * Starting with 6.x indices you may no longer have multiple types in a single index. One reason for this is that if for instance
22
+ * Starting with 6.x indices, you may no longer have multiple types in a single index. One reason for this is that if for instance
23
23
* two types * have the same `name` property they need to be mapped exactly the same but all the API's acted as if you could map
24
24
* them individually which often lead to confusion.
25
25
*
26
26
* So how do you create a parent join now that indices no longer allow you store different types in the same index and therefor also
27
27
* not on the same shard?
28
28
*
29
29
*/
30
-
31
30
public class ParentChildJoins : DocumentationTestBase
32
31
{
33
32
public abstract class MyDocument
@@ -79,8 +78,6 @@ public void SimpleParentChildMapping()
79
78
)
80
79
) ;
81
80
82
- /**
83
- */
84
81
//json
85
82
var expected = new
86
83
{
You can’t perform that action at this time.
0 commit comments