11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

timestamp desc<br />

inner<br />

org.apache.solr.index.TieredMergePolicyFactory<br />

10<br />

10<br />

<br />

The example above shows <strong>Solr</strong>'s SortingMergePolicyFactory being configured to sort documents in<br />

merged segments by "timestamp desc" , and wrapped around a TieredMergePolicyFactory configur<br />

ed to use the values maxMergeAtOnce=10 and segmentsPerTier=10 via the inner prefix defined by So<br />

rtingMergePolicyFactory's<br />

wrapped.prefix option. For more information on using SortingMergeP<br />

olicyFactory, see the segmentTerminateEarly parameter.<br />

mergeScheduler<br />

The merge scheduler controls how merges are performed. The default ConcurrentMergeScheduler perfo<br />

rms merges in the background using separate threads. The alternative, SerialMergeScheduler, does not<br />

perform merges with separate threads.<br />

<br />

mergedSegmentWarmer<br />

When using <strong>Solr</strong> in for Near Real Time Searching a merged segment warmer can be configured to warm the<br />

reader on the newly merged segment, before the merge commits. This is not required for near real-time<br />

search, but will reduce search latency on opening a new near real-time reader after a merge completes.<br />

<br />

Compound File Segments<br />

Each Lucene segment is typically comprised of a dozen or so files. Lucene can be configured to bundle all of<br />

the files for a segment into a single compound file using a file extension of .cfs; it's an abbreviation for<br />

Compound File Segment. CFS segments may incur a minor performance hit for various reasons, depending<br />

on the runtime environment. For example, filesystem buffers are typically associated with open file<br />

descriptors, which may limit the total cache space available to each index. On systems where the number of<br />

open files allowed per process is limited, CFS may avoid hitting that limit. The open files limit might also be<br />

tunable for your OS with the Linux/Unix ulimit command, or something similar for other operating systems.<br />

CFS: New Segments vs Merged Segments<br />

To configure whether newly written segments should use CFS, see the useCompoundFile setting<br />

described above. To configure whether merged segments use CFS, review the Javadocs for your me<br />

rgePolicyFactory .<br />

implementations support and settings<br />

Many Merge Policy noCFSRatio maxCFSSegmentSizeMB wit<br />

h default values that prevent compound files from being used for large segments, but do use<br />

compound files for small segments.<br />

Index Locks<br />

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

442

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

Saved successfully!

Ooh no, something went wrong!