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 James liu <li...@gmail.com> on 2007/04/20 09:51:34 UTC
Question about solrPlugins
i use customer Analyzer. Now i config synonyms filter.
but it not effect.
my schema.xml write:
> <fieldtype name="text" class="solr.TextField">
> <analyzer type="index" class="my.customer.analyzer">
> </analyzer>
> <analyzer type="index" class="my.customer.analyzer">
> <filter class="solr.SynonymFilterFactory" synonyms="
> synonyms.txt" ignoreCase="true" expand="true"/>
> </analyzer>
> </fieldtype>
>
i think query procedure: first do myCustomerAnlyzer, two use synonyms to do
analyzed word.
if analyzed word is find in synonyms.txt and it will do something.
am i right?
i m sure analyzed word in synonyms.txt when i test.(i use
http://localhost:8080/solr1/admin/analysis.jsp?highlight=on to sure it is in
synonyms.txt)
--
regards
jl
Re: Question about solrPlugins
Posted by Yonik Seeley <yo...@apache.org>.
On 4/20/07, James liu <li...@gmail.com> wrote:
> i use customer Analyzer. Now i config synonyms filter.
>
> but it not effect.
>
> my schema.xml write:
>
> > <fieldtype name="text" class="solr.TextField">
> > <analyzer type="index" class="my.customer.analyzer">
> > </analyzer>
> > <analyzer type="index" class="my.customer.analyzer">
> > <filter class="solr.SynonymFilterFactory" synonyms="
> > synonyms.txt" ignoreCase="true" expand="true"/>
> > </analyzer>
> > </fieldtype>
> >
>
> i think query procedure: first do myCustomerAnlyzer, two use synonyms to do
> analyzed word.
> if analyzed word is find in synonyms.txt and it will do something.
You can't chain analyzers. You can specify an analyzer via a
tokenizer followed by several token filters though. Follow the
samples in the example schema.xml
-Yonik