Book Image

Solr Cookbook - Third Edition

By : Rafal Kuc
Book Image

Solr Cookbook - Third Edition

By: Rafal Kuc

Overview of this book

Table of Contents (18 chapters)
Solr Cookbook Third Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Configuring the document cache


Cache can play a major role in your deployment's performance. One of the caches that you can use to configure when setting up Solr is the document cache. It is responsible for storing Lucene internal documents that have been fetched from the disk. The proper configuration of this cache can save precious I/O calls and therefore boost the whole deployment performance. This recipe will show you how to properly configure the document cache.

Getting ready

Remember that the cache usage depends on your queries, update rates, searcher reopening, and on many other things. In this recipe, you will see cache configuration based on some assumptions; however, you will see the logic behind choosing the right cache configuration. You can use the same logic to adjust caches in your Solr deployment.

Also remember that the document cache in Solr is a top-level cache, so whenever a searcher is reopened, the cache is invalidated. This might cause your cache to be almost useless for...