11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

accessed frequently tend to stay in the cache, while those that are not accessed frequently tend to drop out and<br />

will be re-fetched from the index if needed again.<br />

The FastLRUCache, which was introduced in <strong>Solr</strong> 1.4, is designed to be lock-free, so it is well suited for caches<br />

which are hit several times in a request.<br />

Both LRUCache and FastLRUCache use an auto-warm count that supports both integers and percentages<br />

which get evaluated relative to the current size of the cache when warming happens.<br />

The LFUCache refers to the Least Frequently Used cache. This works in a way similar to the LRU cache, except<br />

that when the cache fills up, the entry that has been used the least is evicted.<br />

The Statistics page in the <strong>Solr</strong> Admin UI will display information about the performance of all the active caches.<br />

This information can help you fine-tune the sizes of the various caches appropriately for your particular<br />

application. When a Searcher terminates, a summary of its cache usage is also written to the log.<br />

Each cache has settings to define it's initial size ( initialSize), maximum size ( size) and number of items to<br />

use for during warming ( autowarmCount). The LRU and FastLRU cache implementations can take a<br />

percentage instead of an absolute value for autowarmCount.<br />

Details of each cache are described below.<br />

filterCache<br />

This cache is used by <strong>Solr</strong>IndexSearcher for filters (DocSets) for unordered sets of all documents that match<br />

a query. The numeric attributes control the number of entries in the cache.<br />

<strong>Solr</strong> uses the filterCache to cache results of queries that use the fq search parameter. Subsequent queries<br />

using the same parameter setting result in cache hits and rapid returns of results. See Searching for a detailed<br />

discussion of the fq parameter.<br />

<strong>Solr</strong> also makes this cache for faceting when the configuration parameter facet.method is set to fc. For a<br />

discussion of faceting, see Searching.<br />

<br />

queryResultCache<br />

This cache holds the results of previous searches: ordered lists of document IDs (DocList) based on a query, a<br />

sort, and the range of documents requested.<br />

The queryResultCache has an additional (optional) setting to limit the maximum amount of RAM used ( maxRa<br />

mMB). This lets you specify the maximum heap size, in megabytes, used by the contents of this cache. When the<br />

cache grows beyond this size, oldest accessed queries will be evicted until the heap usage of the cache<br />

decreases below the specified limit.<br />

<br />

documentCache<br />

This cache holds Lucene Document objects (the stored fields for each document). Since Lucene internal<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

453

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!