Thanks Shawn for quick reply.

I am trying to change the code (removing the errors from the code shown in
image) & will test the filter after that & will update here.

Thanks
Kamal Kishore


On Mon, May 19, 2014 at 10:17 PM, Shawn Heisey <s...@elyograg.org> wrote:

> On 5/19/2014 1:10 AM, Kamal Kishore Aggarwal wrote:
> > I have created a custom filter factory for solr 4.2. It is working good.
> > But when I am trying to upgarde solr-4.2 to 4.7 version, it is reporting
> > errors.
> >
> > Caused by: org.apache.solr.common.SolrException: Plugin init failure for
> > [schema.xml] analyzer/filter: Error instantiating class:
> > 'org.apache.lucene.analysis.ExtendedNameFilterFactory'
> >
> > Here's the java code :http://pastebin.com/REu6cJxR,
> > http://pastebin.com/380YZaAM
> >
> > It was working good with solr 4.2. Can anybody tell me the changes that I
> > need to make for running it in solr 4.7.1?
>
> I probably would have used something like com.company.lucene.filter as
> the package name, but what you name the package is up to you, and will
> have no effect on your problem.
>
> I dropped your code into a trunk checkout (the code that will eventually
> become Lucene/Solr 5.0).  The Eclipse editor looked like this for your
> factory class:
>
> https://www.dropbox.com/s/tobjrk0riq7vqqt/extendednamefilterfactory.png
>
> The errors shown for the three red marks are:
>
> * Implicit super constructor TokenFilterFactory() is undefined for
> default constructor. Must define an explicit constructor.
> * The method init(Map<String,String>) is undefined for the type
> TokenFilterFactory.
> * The method getInt(Map<String,String>, String, int) in the type
> AbstractAnalysisFactory is not applicable for the arguments (String, int)
>
> I don't have easy access to a 4.x checkout right this minute, but the
> errors there are probably similar.
>
> Your actual filter class was all good except for three eclipse warnings
> that are fixed by adding a type argument of <String> to the code.
>
> Thanks,
> Shawn
>
>

Reply via email to