What happens  when you use synonym filter at index time only with expand="true" 
with this synonym_index.txt?

I use only comma operator:

hdtv, High Definition Television, High Definition TV, High Definition
Televisions, High Definition TVs

Also putting the synonym filter under the stem filter can be useful in your 
case. Porter can own televisions to television transformation.

--- On Tue, 11/16/10, sivaprasad <sivaprasa...@echidnainc.com> wrote:

> From: sivaprasad <sivaprasa...@echidnainc.com>
> Subject: Re: Problem with synonyms
> To: solr-user@lucene.apache.org
> Date: Tuesday, November 16, 2010, 8:16 AM
> 
> I did changes to the schema file as shown below.
> 
> <analyzer>
>         <tokenizer
> class="solr.WhitespaceTokenizerFactory"/>
>         <filter
> class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="true"/>     
>   
>         <filter
> class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt"/>       
>         <filter
> class="solr.LowerCaseFilterFactory"/>
>         <filter
> class="solr.EnglishPorterFilterFactory"
> protected="protwords.txt"/>
>         <filter
> class="solr.RemoveDuplicatesTokenFilterFactory"/>
> </analyzer>      
> 
> And i have an entry in the synonym.txt file as shown
> below.
> 
> hdtv => High Definition Television, High Definition
> TV,High Definition
> Televisions,High Definition TVs
> 
> Now i submitted the query with debugQuery=on .
> 
> Query1:hdtv
> 
> The parsed query is given below.
> 
> <str name="rawquerystring">hdtv</str> 
> <str name="querystring">hdtv</str> 
> <str
> name="parsedquery">MultiPhraseQuery(searchtext:"high
> definit (televis
> tv tvs)")</str> 
> <str name="parsedquery_toString">searchtext:"high
> definit (televis tv
> tvs)"</str> 
> 
> and the number of results returned is ZERO.
> 
> Query2:High Definition Television
> 
> The parsed query is given below.
> <str name="rawquerystring">High Definition
> Television</str> 
> <str name="querystring">High Definition
> Television</str> 
> <str name="parsedquery">+searchtext:high
> +searchtext:definit
> +(searchtext:televis searchtext:tv
> searchtext:tvs)</str> 
> <str name="parsedquery_toString">+searchtext:high
> +searchtext:definit
> +(searchtext:televis searchtext:tv
> searchtext:tvs)</str> 
> 
> And the number of resullts is 1.
> 
> Why i am getting the results like this even after expanding
> the synonyms.
> -- 
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Problem-with-synonyms-tp1905051p1909369.html
> Sent from the Solr - User mailing list archive at
> Nabble.com.
> 



Reply via email to