Speeding Solr through Solr caching

Many times, the queries that are run on search are repetitive in nature. In such cases, the presence of a cache brings down the average response time for search results. Apache Solr provides a caching mechanism on top of the index data. This cache, unlike a normal cache, does not carry any expiry (persistent cache). It is associated with IndexWriter. The following are the three different types of cache supported by Solr:

  • LRUCache: This is Least Recently Used (based on synchronized LinkedHashMap) (default)
  • FastLRUCache: This is a newer form of cache and is expected to be faster than all the others
  • LFUCache: This is Least Frequently Used (based on ConcurrentHashMap)

The following are the common parameters for the cache ...

Get Scaling Apache Solr now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.