Question about solrPlugins

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about solrPlugins

James liu-2
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
Reply | Threaded
Open this post in threaded view
|

Re: Question about solrPlugins

Yonik Seeley-2
On 4/20/07, James liu <[hidden email]> 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