上QQ阅读APP看书,第一时间看更新
How it works...
Mapping in the case of multiple item relationships in the same index needs to be computed as the sum of all other mapping fields.
The relationship between objects must be defined in join_field.
There must be only a single join_field for mapping; if you need to give a lot of relationships, you can provide them in the relations object.
The child document must be indexed in the same shard of the parent; so, when indexed, an extra parameter must be passed, which is routing (we'll see how to do this in the Indexing a document recipe in the next chapter).
A child document doesn't require reindexing the parent document when we want to change its values. Consequently, it's fast in indexing, reindexing (updating), and deleting.