Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

UsingSynonyms not working for language specific synonyms



I have the following synonyms defined in the Episerver find backend:

All langugages: 123 <> training
Dutch: 456 <> training

This is the relevant part of my search code:

            multiSearch.Search<ISearchableTraining, SearchResult>(language, search =>
                var searchQuery = search
                    .Filter(x => x.SearchAvailability, x => x.MarketId.Match(currentMarket.MarketId.Value) & x.IsAvailable.Match(true));

                return searchQuery
                    .Select(x => new SearchResult(iconWidth, iconHeight)
                        Name = x.Name,
                        Url = x.ContentLink.GetUrl(true),
                        Type = SearchCategoryValue.Trainings,
                        DisplayType = LocalizationService.Current.GetString("/search/type/trainingen"),
                        Icon = x.Icon,
                        Intro = x.Intro,
                        BackgroundColor = x.BackgroundColor

When the language == Language.Dutch, and the query == "123" then the UsingSynonyms is working as expected.
But when the language == Language.Dutch, and the query == "456" then the UsingSynonyms is NOT working as expected. I get 0 results. I expect to get the same results as when searching for "123".

Why is this not working as expected?

Kind regards,

Feb 06, 2020 9:04

This issue is also experienced by me.
And a similar issue can be reproduced in 'one way' synonyms (Maybe it is by design, but want to know where it is mentioned)


Defined synonyms: (word1 > word2), (word2 > word3).

If I search for 'word1' it will not give results for 'word3'. I expect to have 'word1' + 'word2' + 'word3' results.

Feb 11, 2020 4:42
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.