June 2017
Beginner to intermediate
404 pages
8h 22m
English
A child document is stored in the same shard as the parent document. By storing both the documents on the same shard, Elasticsearch can avoid extra trips to fetch the data. When indexing the child document, it uses the parent ID to find the shard where the parent document exists. What makes parent-child queries expensive is managing the mapping between parent and child documents. Elasticsearch stores the join information in what it calls global-ordinals, which are lazily built the first time the query is executed.
Read now
Unlock full access