Hello everyone,
I am using solr 8.3.
After I included Synonym Graph Filter in my managed-schema file, I have
noticed that if the query string contains a multi-word synonym, it
considers that multi-word synonym as a single term and does not break it,
further suppressing the default search behaviour.
I am using StandardTokenizer.
Below is a snippet from managed-schema file -
<fieldType name="text_general" class="solr.TextField"
positionIncrementGap="100" multiValued="true">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>
<filter class="solr.SynonymGraphFilterFactory" expand="true"
ignoreCase="true" synonyms="synonyms.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
Here "soap powder" is the search query which is also a multi-word synonym
in the synonym file as-
s(104254535,1,'soap powder',n,1,1).
s(104254535,2,'built-soap powder',n,1,0).
s(104254535,3,'washing powder',n,1,0).
I am sharing some screenshots for understanding the problem-
without Synonym Graph Filter => 2 docs returned (screenshot at below
mentioned URL) -
https://ibb.co/zQXx7mV
with Synonym Graph Filter => 2 docs expected, only 1 returned (screenshot
at below mentioned URL) -
https://ibb.co/tp04Rzw
Has anyone experienced this before? If yes, is there any workaround ?
Or is it an expected behaviour?
Regards,
Atin Janki
>