Episerver WithAndAsDefaultOperator() does not work as expected with UsingSynonyms()

254 views Asked by At

I have created a 'one way' synonym as “dog” > "animal”.

  • When I search for "test+dog" it gives many results. (Which is as expected)
  • When I search for "dog+test" it gives 0 results. (Which is not as expected)

The above both queries should return the same result set (Many results) regardless of the word order.

My search implementation is like below,

search = search.For(queryText) 
        .InAllField() 
        .WithAndAsDefaultOperator() 
        .UsingSynonyms();

This issue is not reproducible when,

  • we remove the synonyms defined.
  • we remove the WithAndAsDefaultOperator() or the UsingSynonyms().

This means there is an incompatibility/issue with the UsingSynonyms() when used along with the WithAndAsDefaultOperator().

Is this a known issue ?

Note: I have found that there is an issue with multi-words synonyms and the WithAndAsDefaultOperator. But in my case, it is not about multi-word synonyms. But I do not know whether my issue is happening because of the same issue which fuels the multi-words synonyms issue.

My Episerver Find version is 13.2.x

Thanks.

0

There are 0 answers