Summary

In NoSQL, it's hard to establish relational data as data is scattered over various excluded buckets and you cannot interconnect them to process data.

However, Elasticsearch gives us various options to achieve this.

We saw that nested and parent-child structures give some good mechanisms to establish relational data. A cross comparison of these two approaches is as follows:

  • A nested approach:
    • The data is joined by a design
    • This is ideal for cases with a smaller number of children
    • This is faster than the parent-child approach
    • Adding or deleting child means the entire document has to be reindexed, which is very costly in Lucene
    • Editing information of parent will also require a reindex, which is again very expensive
  • A parent-child approach:
    • This works ...

Get Elasticsearch Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.