Configuring filter cache for searching 

The DSE Search configurable filter cache reliably bounds the filter cache memory usage for a Solr core.

The DSE Search configurable filter cache, SolrFilterCache, can reliably bound the filter cache memory usage for a Solr core. This implementation contrasts with the default Solr implementation which defines bounds for filter cache usage per segment. SolrFilterCache bounding works by evicting cache entries after the configured per core high water mark is reached, and stopping after the configured lower water mark is reached.

Note: SolrFilterCache does not support auto-warming.

Procedure

To configure the filter cache thresholds:

  1. In your solrconfig.xml file, set the class attribute of the filterCache element to solr.search.SolrFilterCache.
  2. To define the low and high watermark for cache eviction, set the lowWaterMarkMB and highWaterMarkMB attributes.
    lowWaterMarkMB

    The minimum memory use in MB to stop cache eviction.

    highWaterMarkMB
    The maximum memory use in MB to trigger the cache eviction.
    Use the following configuration to set the lower bound cache usage of 128 MB and the upper bound of cache usage of 256 MB:
    <filterCache
           class="solr.search.SolrFilterCache"
           lowWaterMarkMB="128"
           highWaterMarkMB="256" />