matt connolly wrote:
>
>
> swarag wrote:
>>
>> Knowing the Lucene struggles with multi-word query-time synonyms, my
>> question is, does this also affect index-time synonyms? What other
>> alternatives do we have if we require there to be multiple word synonyms?
>>
>
> No the multiple word problem doesn't happen with index synonyms, only
> query synonyms.
>
> See:
> http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#head-2c461ac74b4ddd82e453dc68fcfc92da77358d46
>
> I ended up using index time synonyms, but ideally, I'd like to see a
> filter factory that does something like the SynsExpand tool does (which
> was written for lucene, not solr).
>
I've tried this and it doesn't seem to work. Here are the basics of my
config:
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="false"/>
...
Synonyms for queryTime is off
Here is a basic example of some synonyms in my synonyms.txt:
club=>club,bar,night cabaret
bar=>bar,club
As you can see, a search for 'bar' will return any documents with 'bar' or
'club' in the name. This works fine. However, a search for 'club' SHOULD
return any documents with 'club', 'bar' or 'night cabaret' in the name, but
it does not. It only returns 'bar' and 'club'.
Interestingly, a search for 'night cabaret' gives me all 'night cabaret's,
'bar's and 'club's...which is quite unexpected since I'm using
uni-directional synonym config (using the => symbol)
Does your config give you my desired behavior?
--
View this message in context:
http://www.nabble.com/solr-synonyms-behaviour-tp15051211p18469995.html
Sent from the Solr - User mailing list archive at Nabble.com.