Book Image

ElasticSearch Blueprints

Book Image

ElasticSearch Blueprints

Overview of this book

Table of Contents (15 chapters)
Elasticsearch Blueprints
About the Author
About the Reviewer


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 well for large number of children

    • This is ideal for large relations with a large number of children

    • Adding and deleting a child is seamless and cheap

    • Editing parent information can be done without any updation on the child document

    • Parent child is a...