Solr
  1. Solr
  2. SOLR-1580

Solr Configuration ignores 'mergeFactor' parameter, always uses Lucene default

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.4.1, 1.5, 3.1, 4.0-ALPHA
    • Component/s: update
    • Labels:
      None

      Description

      The 'mergeFactor' parameter in solrconfig.xml is parsed by SolrIndexConfig but is not consulted by SolrIndexWriter. This parameter controls the number of segments that are merged at once and also controls the total number of segments allowed to accumulate in the index.

      IndexWriter.mergeFactor

      1. SOLR-1580.patch
        2 kB
        Mark Miller
      2. SOLR-1580.patch
        1 kB
        Lance Norskog

        Activity

        Hide
        Mark Miller added a comment -

        Looks like this was dropped a commit or two ago:

        r817650 SOLR-1447

        Should prob just be reverted to what it was - not sure we need to try and cap it and it needs the LogMergePolicy check. Though the >0 check makes a bit more sense to me than != -1.

        if (config.mergeFactor != -1 && getMergePolicy() instanceof LogMergePolicy)

        { setMergeFactor(config.mergeFactor); }
        Show
        Mark Miller added a comment - Looks like this was dropped a commit or two ago: r817650 SOLR-1447 Should prob just be reverted to what it was - not sure we need to try and cap it and it needs the LogMergePolicy check. Though the >0 check makes a bit more sense to me than != -1. if (config.mergeFactor != -1 && getMergePolicy() instanceof LogMergePolicy) { setMergeFactor(config.mergeFactor); }
        Hide
        Mark Miller added a comment -

        So the workaround is to use the functionality of SOLR-1447

        <mergePolicy class="org.apache.lucene.index.LogByteSizeMergePolicy">
        <int name="mergeFactor">3</int>
        </mergePolicy>

        Possibly why it was taken out? But the example config was not updated to reflect, so who knows I guess.

        Show
        Mark Miller added a comment - So the workaround is to use the functionality of SOLR-1447 <mergePolicy class="org.apache.lucene.index.LogByteSizeMergePolicy"> <int name="mergeFactor">3</int> </mergePolicy> Possibly why it was taken out? But the example config was not updated to reflect, so who knows I guess.
        Hide
        Mark Miller added a comment -

        Reminder to put this issue and workaround on solr 1.4 post release notes wiki page.

        Show
        Mark Miller added a comment - Reminder to put this issue and workaround on solr 1.4 post release notes wiki page.
        Hide
        Mark Miller added a comment -

        Ill wait a bit for comments and then commit. Thanks Lance!

        Show
        Mark Miller added a comment - Ill wait a bit for comments and then commit. Thanks Lance!
        Hide
        Mark Miller added a comment -

        Thanks Lance!

        Show
        Mark Miller added a comment - Thanks Lance!
        Hide
        Hoss Man added a comment -

        Correcting Fix Version based on CHANGES.txt, see this thread for more details...

        http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E

        Show
        Hoss Man added a comment - Correcting Fix Version based on CHANGES.txt, see this thread for more details... http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E
        Hide
        Hoss Man added a comment -

        Committed revision 949891.

        merged to branch-1.4 for 1.4.1

        Show
        Hoss Man added a comment - Committed revision 949891. merged to branch-1.4 for 1.4.1

          People

          • Assignee:
            Mark Miller
            Reporter:
            Lance Norskog
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development