Solr Synonyms not working when field name is added in q/fq

Viewed 42

I am trying to implement synonymFilterFactory in solr5.5. say I have the the following synonyms listed in my synonym.txt

editor,proofreader

on the solr admin when I try to search q=editor, it returns proper results with documents containing editor or proofreader, but when I search for q=title:editor, it gives me only those documents where the title contains editor (the documents with title having proofreader is skipped). I am not sure if this is the expected behaviour of solr synonyms or am I missing something. Any help would be highly appreciated.

Fieldtype definition used to store title field:

<fieldType name="text_suggest_stem" class="solr.TextField" positionIncrementGap="100">
  <analyzer type="index">
    <tokenizer class="solr.StandardTokenizerFactory"/>
    <filter class="solr.EdgeNGramFilterFactory" minGramSize="3" maxGramSize="15"/>
    <filter class="solr.EnglishPossessiveFilterFactory"/>
    <filter class="solr.KeywordMarkerFilterFactory" protected="protectwords.txt"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.PorterStemFilterFactory"/>
    <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  </analyzer>
  <analyzer type="query">
    <tokenizer class="solr.StandardTokenizerFactory"/>
    <filter class="solr.EnglishPossessiveFilterFactory"/>
    <filter class="solr.KeywordMarkerFilterFactory" protected="protectwords.txt"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.PorterStemFilterFactory"/>
    <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  </analyzer>
</fieldType>

I am using the same fieldType to store other values like description, job domain etc.

0 Answers
Related