On 6/20/2011 12:31 PM, Michael McCandless wrote:
For back-compat, mergeFactor maps to both of these, but it's better to set them directly eg:<mergePolicy class="org.apache.lucene.index.TieredMergePolicy"> <int name="maxMergeAtOnce">10</int> <int name="segmentsPerTier">20</int> </mergePolicy> (and then remove your mergeFactor setting under indexDefaults)
When I did this and ran a reindex, it merged once it reached 10 segments, despite what I had defined in the mergePolicy. This is Solr 3.2 with the patch from SOLR-1972 applied. I've included the config snippet below into solrconfig.xml using xinclude via another file. I had to put mergeFactor back in to make it work right. I haven't checked yet to see whether an optimize takes one pass. That will be later today.
<mergePolicy class="org.apache.lucene.index.TieredMergePolicy"> <int name="maxMergeAtOnce">35</int> <int name="segmentsPerTier">35</int> <int name="maxMergeAtOnceExplicit">105</int> </mergePolicy> Shawn
