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 Chris Hostetter <ho...@fucit.org> on 2009/07/02 19:57:13 UTC

Re: multi-word synonyms with multiple matches

: vp,vice president
: svp,senior vice president
: 
: However, a search for "vp" does not return results where the title is 
: "senior vice president".  It appears that the term "vp" is not indexed 
: when there is a longer string that matches a different synonym.  Is this 
: by design, and is there any way to make solr index all synonyms that 
: match a term, even if it is contained in a longer synonym?  Thanks!

You haven't given us the full details on how you are using the 
SynonymFilterFactory ("expand" true or false?) but in general: yes the 
SynonymFilter finds the longest match it can.

if every svp is also a vp, then being explict in your synonyms (when doing 
index time expansion) should work...

vp,vice president
svp,senior vice president=>vp,svp,senior vice president



-Hoss


RE: multi-word synonyms with multiple matches

Posted by Ensdorf Ken <En...@zoominfo.com>.
> You haven't given us the full details on how you are using the
> SynonymFilterFactory ("expand" true or false?) but in general: yes the
> SynonymFilter finds the longest match it can.

Sorry - doing expansion at index time:
<filter class="solr.SynonymFilterFactory" synonyms="title_synonyms.txt" ignoreCase="true" expand="true"/>

>
> if every svp is also a vp, then being explict in your synonyms (when
> doing
> index time expansion) should work...
>
> vp,vice president
> svp,senior vice president=>vp,svp,senior vice president

That worked - thanks!