You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by David Espinosa <es...@gmail.com> on 2009/09/02 16:40:21 UTC
Polish Stemmer
Hi,
I’m developing a multi language Solr index, where I have a single core for
each one. I use SnowballPorterFilterFactory for German, French and Italian
languages with excellent results.
My problem appears when I try to create a Polish stemmed index. There isn’t
a Snowball implementation for Polish, but I found a lucene one:
http://www.getopt.org/stempel/index.html#distrib
I included the jar into Solr lib folder and included the filter into the
appropriate fieldtype (<filter
class="org.getopt.stempel.lucene.StempelFilter" />) but when I run the
server this error appears:
GRAVE: *org.apache.solr.common.SolrException*: Error instantiating class:
'org.getopt.stempel.lucene.StempelFilter'
Has anybody found this error before? Other solutions for Polish Stemming
would be great too.
Thanks in advance.
Re: Polish Stemmer
Posted by David Espinosa <es...@gmail.com>.
Thanks very much!
I suppose I’m still very dummy in Solr, I was supposting I could do it
directly.
I did what you said and it seems to work perfectly!
*public* *class* PolishStemFilterFactory *extends* BaseTokenFilterFactory {
*public* StempelFilter create(TokenStream in) {
*return* *new* StempelFilter(in);
}
}
Thank you very much Shalin!
2009/9/2 Shalin Shekhar Mangar <sh...@gmail.com>
> On Wed, Sep 2, 2009 at 8:10 PM, David Espinosa <es...@gmail.com> wrote:
>
> > My problem appears when I try to create a Polish stemmed index. There
> isn’t
> > a Snowball implementation for Polish, but I found a lucene one:
> >
> > http://www.getopt.org/stempel/index.html#distrib
> >
> > I included the jar into Solr lib folder and included the filter into the
> > appropriate fieldtype (<filter
> > class="org.getopt.stempel.lucene.StempelFilter" />) but when I run the
> > server this error appears:
> >
> > GRAVE: *org.apache.solr.common.SolrException*: Error instantiating class:
> > 'org.getopt.stempel.lucene.StempelFilter'
> >
>
> You'd need to create a factory class which implements Solr's
> TokenFilterFactory or extends BaseTokenFilterFactory which creates the
> StempelFilter. Then specify the factory class in schema.xml
>
> --
> Regards,
> Shalin Shekhar Mangar.
>
Re: Polish Stemmer
Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Wed, Sep 2, 2009 at 8:10 PM, David Espinosa <es...@gmail.com> wrote:
> My problem appears when I try to create a Polish stemmed index. There isn’t
> a Snowball implementation for Polish, but I found a lucene one:
>
> http://www.getopt.org/stempel/index.html#distrib
>
> I included the jar into Solr lib folder and included the filter into the
> appropriate fieldtype (<filter
> class="org.getopt.stempel.lucene.StempelFilter" />) but when I run the
> server this error appears:
>
> GRAVE: *org.apache.solr.common.SolrException*: Error instantiating class:
> 'org.getopt.stempel.lucene.StempelFilter'
>
You'd need to create a factory class which implements Solr's
TokenFilterFactory or extends BaseTokenFilterFactory which creates the
StempelFilter. Then specify the factory class in schema.xml
--
Regards,
Shalin Shekhar Mangar.