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 Mani Kumar <ma...@gmail.com> on 2009/07/05 09:19:19 UTC

SynonymFilterFactory usage

hi all,

i am confused a bit about how to use synonym filter configs. i am using solr
1.4.

default config is like :

for query analyzer:
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
for index analyzer:
        its commented.

while looking @ documentation deeply on
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#head-2c461ac74b4ddd82e453dc68fcfc92da77358d46
*"**Keep in mind that while the SynonymFilter will happily work with
synonyms containing multiple words (ie: "**
sea biscuit, sea biscit, seabiscuit**") The recommended approach for dealing
with synonyms like this, is to expand the synonym when indexing. This is
because there are two potential issues that can arrise at query time**"*
*
*
considering this above recommendation i think following is the best option
for synonym filter
*  for query analyzer: *
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="false"/>
for index analyzer:
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>

am i right?

what do you guys suggest?

thanks!
mani kumar

Re: SynonymFilterFactory usage

Posted by Mark Miller <ma...@gmail.com>.
Disclaimer: I'm no expert here.

Well, are you working with multi-word synonyms? If so, then yes, I'd say 
that makes sense to do it at index time. Otherwise, it really depends on 
a host of factors.

In terms of your settings, if you expand synonyms at index time, what 
would be the point of reducing synonyms at query time? I think you just 
need the index time filter?

-- 
- Mark

http://www.lucidimagination.com



Mani Kumar wrote:
> anyone?
>
> ps: my apologies if you guys think its spamming. but i really need some help
> here.
>
> thanks!
> mani
>
> On Sun, Jul 5, 2009 at 12:49 PM, Mani Kumar <ma...@gmail.com>wrote:
>
>   
>> hi all,
>>
>> i am confused a bit about how to use synonym filter configs. i am using
>> solr 1.4.
>>
>> default config is like :
>>
>> for query analyzer:
>>         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
>> ignoreCase="true" expand="true"/>
>> for index analyzer:
>>         its commented.
>>
>> while looking @ documentation deeply on
>>
>> http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#head-2c461ac74b4ddd82e453dc68fcfc92da77358d46
>> *"**Keep in mind that while the SynonymFilter will happily work with
>> synonyms containing multiple words (ie: "**
>> sea biscuit, sea biscit, seabiscuit**") The recommended approach for
>> dealing with synonyms like this, is to expand the synonym when indexing. This
>> is because there are two potential issues that can arrise at query time**"
>> *
>> *
>> *
>> considering this above recommendation i think following is the best option
>> for synonym filter
>> *  for query analyzer: *
>>         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
>> ignoreCase="true" expand="false"/>
>> for index analyzer:
>>         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
>> ignoreCase="true" expand="true"/>
>>
>> am i right?
>>
>> what do you guys suggest?
>>
>> thanks!
>> mani kumar
>>
>>
>>     
>
>   




Re: SynonymFilterFactory usage

Posted by Mani Kumar <ma...@gmail.com>.
anyone?

ps: my apologies if you guys think its spamming. but i really need some help
here.

thanks!
mani

On Sun, Jul 5, 2009 at 12:49 PM, Mani Kumar <ma...@gmail.com>wrote:

> hi all,
>
> i am confused a bit about how to use synonym filter configs. i am using
> solr 1.4.
>
> default config is like :
>
> for query analyzer:
>         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="true"/>
> for index analyzer:
>         its commented.
>
> while looking @ documentation deeply on
>
> http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#head-2c461ac74b4ddd82e453dc68fcfc92da77358d46
> *"**Keep in mind that while the SynonymFilter will happily work with
> synonyms containing multiple words (ie: "**
> sea biscuit, sea biscit, seabiscuit**") The recommended approach for
> dealing with synonyms like this, is to expand the synonym when indexing. This
> is because there are two potential issues that can arrise at query time**"
> *
> *
> *
> considering this above recommendation i think following is the best option
> for synonym filter
> *  for query analyzer: *
>         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="false"/>
> for index analyzer:
>         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="true"/>
>
> am i right?
>
> what do you guys suggest?
>
> thanks!
> mani kumar
>
>