Steps for managing cache depending on version.
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:
-
Open solrconfig.xml for editing.
-
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>
-
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.