Book Image

Apache Solr High Performance

By : Surendra Mohan
Book Image

Apache Solr High Performance

By: Surendra Mohan

Overview of this book

Table of Contents (14 chapters)

Solr caching


In this section, we will learn about the different caching techniques and ways to configure them appropriately so as to achieve better performance of your Solr instance.

Document caching

Document cache, one of the cache types available with us, stores Lucene's internal documents fetched from the disk. In order to get the document caching to work at its optimal level, you need to configure it appropriately so as to minimize I/O calls that result in boosted deployment performance.

Let us assume that we are dealing with the deployment of Solr, where we have approximately 100,000 documents to address. Additionally, our single Solr instance gets a maximum of 10 concurrent queries and each query can fetch 220 documents, which is the maximum count.

Based on the preceding parameters, our documentcache tag should look similar to the following code snippet (add the following code to your solrconfig.xml file):

<documentCache
  class="solr.LRUCache"
  size="2200"
  initialSize="2200"/&gt...