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 sara hajili <ha...@gmail.com> on 2015/12/17 09:29:39 UTC

add text analyzer to solr

hi.
i wanna to change solr analyzer , like normalization.
because solr default normalization for persian language does't satisfy me.
so i start reading solr plugins .
and i try to implement my PersianNormalization.
now i have 2 class in this way :
class persianNormalizer extends TokenFilter.
and another class:
class persianNormalizerFilterFactory extends TokenFilterFactory.
and then i create a jar file from in this 2 class.
and then i add this jar file in solr_home/dist and
solr_home/contrib/extraction
(i select this 2 folder because in solrConf.xml in tag lib this to Dir was
set as a lib dir)
and then in schema.xml i create a one textfield  that use
PersianAnlyzerFilterFactory
in this way :
<filter class="solr.PersianCustomNormalizerFilterFactory" />
but when solr comes up,i get error :
how i solve my problem.can any one tell me how to use my normalizer in solr?
or can any one tell me about existing tutorial that determine how write
text analyzer and use that in solr step by step?
the error that i faced with it in solr when adding core was :
and core didn't add to solr.
plz help me.
org.apache.solr.common.SolrException: Error CREATEing SolrCore 'post':
Unable to create core [post] Caused by:
solr.PersianCustomNormalizerFilterFactory

Re: add text analyzer to solr

Posted by Binoy Dalal <bi...@gmail.com>.
Why don't you post the entire stack trace from the logs. That might give us
a better idea to help you.

On Thu, 17 Dec 2015, 13:59 sara hajili <ha...@gmail.com> wrote:

> hi.
> i wanna to change solr analyzer , like normalization.
> because solr default normalization for persian language does't satisfy me.
> so i start reading solr plugins .
> and i try to implement my PersianNormalization.
> now i have 2 class in this way :
> class persianNormalizer extends TokenFilter.
> and another class:
> class persianNormalizerFilterFactory extends TokenFilterFactory.
> and then i create a jar file from in this 2 class.
> and then i add this jar file in solr_home/dist and
> solr_home/contrib/extraction
> (i select this 2 folder because in solrConf.xml in tag lib this to Dir was
> set as a lib dir)
> and then in schema.xml i create a one textfield  that use
> PersianAnlyzerFilterFactory
> in this way :
> <filter class="solr.PersianCustomNormalizerFilterFactory" />
> but when solr comes up,i get error :
> how i solve my problem.can any one tell me how to use my normalizer in
> solr?
> or can any one tell me about existing tutorial that determine how write
> text analyzer and use that in solr step by step?
> the error that i faced with it in solr when adding core was :
> and core didn't add to solr.
> plz help me.
> org.apache.solr.common.SolrException: Error CREATEing SolrCore 'post':
> Unable to create core [post] Caused by:
> solr.PersianCustomNormalizerFilterFactory
>
-- 
Regards,
Binoy Dalal