Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Elasticsearch - Second Edition

You're reading from   Mastering Elasticsearch - Second Edition Further your knowledge of the Elasticsearch server by learning more about its internals, querying, and data handling

Arrow left icon
Product type Paperback
Published in Feb 2015
Publisher
ISBN-13 9781783553792
Length 434 pages
Edition 2nd Edition
Languages
Arrow right icon
Toc

Table of Contents (11) Chapters Close

Preface 1. Introduction to Elasticsearch FREE CHAPTER 2. Power User Query DSL 3. Not Only Full Text Search 4. Improving the User Search Experience 5. The Index Distribution Architecture 6. Low-level Index Control 7. Elasticsearch Administration 8. Improving Performance 9. Developing Elasticsearch Plugins Index

Routing explained


In the Choosing the right amount of shards and replicas section in this chapter, we mentioned routing as a solution for the shards on which queries will be executed on a single one. Now it's time to look closer at this functionality.

Shards and data

Usually, it is not important how Elasticsearch divides data into shards and which shard holds the particular document. During query time, the query will be sent to all the shards of a particular index, so the only crucial thing is to use the algorithm that spreads our data evenly so that each shard contains similar amounts of data. We don't want one shard to hold 99 percent of the data while the other shard holds the rest—it is not efficient.

The situation complicates slightly when we want to remove or add a newer version of the document. Elasticsearch must be able to determine which shard should be updated. Although it may seem troublesome, in practice, it is not a huge problem. It is enough to use the sharding algorithm, which...

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 $19.99/month. Cancel anytime