lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (Assigned) (JIRA)" <>
Subject [jira] [Assigned] (SOLR-2983) Unable to load custom MergePolicy
Date Tue, 20 Mar 2012 18:09:39 GMT


Hoss Man reassigned SOLR-2983:

    Assignee: Tomás Fernández Löbbe  (was: Simon Willnauer)

Tomas: as simon said, this patch looks good provided we have a blurb about the change in the
upgrade/backcompat section.

wanna go ahead an commit for 3.6?

(although: please remove that cut/paste comment about "kitchen sink" in your new bad-mp-solrconfig.xml)
> Unable to load custom MergePolicy
> ---------------------------------
>                 Key: SOLR-2983
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Mathias Herberts
>            Assignee: Tomás Fernández Löbbe
>            Priority: Minor
>             Fix For: 3.6, 4.0
>         Attachments: SOLR-2983.patch
> As part of a recent upgrade to Solr 3.5.0 we encountered an error related to our use
of LinkedIn's ZoieMergePolicy.
> It seems the code that loads a custom MergePolicy was at some point moved into
from, but as this code was copied verbatim it now contains a bug:
>     try {
>       policy = (MergePolicy) schema.getResourceLoader().newInstance(mpClassName, null,
new Class[]{IndexWriter.class}, new Object[]{this});
>     } catch (Exception e) {
>       policy = (MergePolicy) schema.getResourceLoader().newInstance(mpClassName);
>     }
> 'this' is no longer an IndexWriter but a SolrIndexConfig, therefore the call to newInstance
will always throw an exception and the catch clause will be executed. If the custom MergePolicy
does not have a default constructor (which is the case of ZoieMergePolicy), the second attempt
to create the MergePolicy will also fail and Solr won't start.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message