Managing caching

Steps for managing cache depending on version.

In DataStax Enterprise 3.2.8, The DSENRTCachingDirectoryFactory is deprecated. If you use DSENRTCachingDirectoryFactory or the NRTCachingDirectoryFactory, modify the solrconfig to use the StandardDirectoryFactory. For example, change the directoryFactory element in the solrconfig as follows:

<directoryFactory class="solr.StandardDirectoryFactory" name="DirectoryFactory"/>
In DataStax Enterprise 3.2.7, and earlier, DataStax Enterprise defaults to using NRTCachingDirectoryFactory, which is the OS Solr-recommended setting for real-time performance. These default properties specify where files are cached and files are managed:
  • maxMergeSizeMB = 4.0 MB
  • maxCachedMB = 48.0 MB

Typically, when using DataStax Enterprise, you change the factory class to DSENRTCachingDirectoryFactory and configure the file properties in the solrconfig.xml.

Procedure

Configuring where files are cached:

  1. Open solrconfig.xml for editing.
  2. Add a directoryFactory element to solrconfig.xml of type DSENRTCachingDirectoryFactory. For example:
    <directoryFactory name="DirectoryFactory"
      class="com.datastax.bdp.cassandra.index.solr.DSENRTCachingDirectoryFactory">
      <double name="maxmergesizemb">5.0</double>
      <double name="maxcachedmb">32.0</double>
    </directoryFactory>
    
  3. Adjust the DirectoryFactory attributes, using lowercase property names, for your environment.
    • maxmergesizemb

      The threshold (MB) for writing a merge segment to memory or to the file system. If the estimated size of merging a segment is less than maxmergesizemb, the merge segment is written to the memory; otherwise, it is written to the file system.

    • maxcachemb

      The maximum value (MB) for writing a merged segment into memory as opposed to disk.