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)

Caching

When you execute an aggregation query, the node that receives the request sends the query to all the shards of the index. The results from each shard are gathered back and sent to the client. The aggregation results are cached at a shard level. Computing an aggregation is an expensive operation. Caching the response greatly improves the performance and reduces the strain on the system. Elasticsearch cache is smart and is automatically invalidated where there is new data. Since the cache is per shard, the cache is invalidated only for the shards that have new/modified data. Starting Elasticsearch 5.0, the request cache is enabled by default. The query JSON is used as a key.

Cache greatly improves performance for indexes that have static data. For example, if you have a time-based index, the old indexes are not changed anymore. The aggregation results for the old data can...

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}