Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1580

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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
        1 kB
        Lance Norskog
      2. SOLR-1580.patch
        2 kB
        Mark Miller

        Activity

        Hide
        hossman Hoss Man added a comment -

        Committed revision 949891.

        merged to branch-1.4 for 1.4.1

        Show
        hossman Hoss Man added a comment - Committed revision 949891. merged to branch-1.4 for 1.4.1
        Hide
        hossman 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
        hossman 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
        markrmiller@gmail.com Mark Miller added a comment -

        Thanks Lance!

        Show
        markrmiller@gmail.com Mark Miller added a comment - Thanks Lance!
        Hide
        markrmiller@gmail.com Mark Miller added a comment -

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

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

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

        Show
        markrmiller@gmail.com Mark Miller added a comment - Reminder to put this issue and workaround on solr 1.4 post release notes wiki page.
        Hide
        markrmiller@gmail.com 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
        markrmiller@gmail.com 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
        markrmiller@gmail.com 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
        markrmiller@gmail.com 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); }

          People

          • Assignee:
            markrmiller@gmail.com Mark Miller
            Reporter:
            lancenorskog Lance Norskog
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development