Hello,

I've read several post on this issue, but can't find a real solution to my
multi-words synonyms matching problem.

I have in my synonyms.txt an entry like

mairie, hotel de ville

and my index time analyzer is configured as followed for synonyms.

<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>

The problem I have is that now "mairie" matches with "hotel" and I would
only want "mairie" to match with "hotel de ville" and "mairie".

When I look into the analyzer, I see that "mairie" is mapped into "hotel",
and words "de ville" are added in second and third position. To change
that, I tried to do

<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"
tokenizerFactory="solr.KeywordTokenizerFactory"/> (as I read in one post)

and I can see now in the analyzer that "mairie" is mapped to "hotel de
ville", but now when I have query "hotel de ville", it doesn't match at all
with "mairie".

Anyone has a clue of what I'm doing wrong?

I'm using Solr 3.4.

Thanks,
Elisabeth

Reply via email to