The SolrConfig patch changed the interface for creating a token filter factory:

  @Deprecated
  public void init(Map<String,String> args) {
log.warning("calling the deprecated form of init; should be calling init(SolrConfig solrConfig, Map<String,String> args)");
    this.args=args;
  }

The analyzer creation chain now calls public void init(SolrConfig solrConfig, Map<String,String> args) instead.

This is very bad from a backward compatibility point of view. For most extensions, their analyzers will just stop working in mysterious ways (since they will not get the correct parameters). The above log WARNING will not be generated, because that method is not called by Solr. The only hint that something is amiss is

[javac] Note: XXFilterFactor.java uses or overrides a deprecated API.

which should not be an indication that the code in question will not function correctly. Also, there isn't a peep of warning in CHANGES.txt

The problem seems to stem from leaving in the old method. Since we are breaking backward compatibility, it would be better to break hard and prevent Solr from compiling, or to actually provide backward compatiblity.

grumpy,
-Mike



Reply via email to