I'm using Solr as a search engine in my site and all is going well except for synonym matching.
My synonym.txt file looks like:
uk => united kingdom,england,scotland,wales
This works for returning results marked "United Kingdom" but not for the others. If I reverse the ordering then "United Kingdom" results aren't returned.
My fieldtype looks like this:
<fieldType name="text" class="solr.TextField" omitNorms="false">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SynonymFilterFactory" tokenizerFactory="solr.KeywordTokenizerFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
</analyzer>
</fieldType>
I'm pretty new to solr so any help is much appreciated!