Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Elasticsearch

You're reading from  Learning Elasticsearch

Product type Book
Published in Jun 2017
Publisher Packt
ISBN-13 9781787128453
Pages 404 pages
Edition 1st Edition
Languages
Author (1):
Abhishek Andhavarapu Abhishek Andhavarapu
Profile icon Abhishek Andhavarapu

Table of Contents (11) Chapters

Preface Introduction to Elasticsearch Setting Up Elasticsearch and Kibana Modeling Your Data and Document Relations Indexing and Updating Your Data Organizing Your Data and Bulk Data Ingestion All About Search More Than a Search Engine (Geofilters, Autocomplete, and More) How to Slice and Dice Your Data Using Aggregations Production and Beyond Exploring Elastic Stack (Elastic Cloud, Security, Graph, and Alerting)

Handling relations between different document types

In the relational world, data is often divided into multiple tables and is linked using foreign keys. To get the data, a join is used to combine data from one or more tables. But in the NoSQL world, data is usually denormalized and stored as one big document. However, it is often advantageous to store these documents separately. Data in Elasticsearch is immutable. An update to an existing document means fetching the old document, applying the change, and re-indexing it as a new document. The update is an expensive operation. If possible, we have to keep the updates to a minimum.

For example, a blog article can have one or more comments, and an order can have one or more line items. If we can separate the article and comment documents, we don't have to update the article when there is a new comment. Elasticsearch provides...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}