I have a set of terms that I want to map to a specific phrase at query time. For that I am using solr.SynonymFilterFactory. Here is a snippet from schema.xml
<fieldType name="text_lc" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
</analyzer>
</fieldType>
Here is the synonyms.txt
cat, bat, mouse => small animals
Here is the output of analysis:
The problem is that small animals are appearing as separate tokens whereas I want to search on "small animals" as a whole.
How to get a multi-word synonym as a single entity in solr?
