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 othersLFUCache
: This is Least Frequently Used (based onConcurrentHashMap
)
The following are the common parameters for the cache in solrconfig.xml
:
Parameter |
Description |
---|---|
|
You can specify the type of cache you wish to attach, that is, |
|
This is the maximum size a cache can reach. |
|
This is the initial... |