Try our conversational search powered by Generative AI!

Boost result from synonym to top.

Vote:
 

I am using Episerver find Multisearch currently which works all good. The requirement here is if I search for a text (Ex: Chi) and if there is synonym set for this word as "Chicken" and there is a page with name "Chile", I need to boost the Chicken result so its on top.

This is the sample I have for search:

var Search = _findClient.Search<IContent>(ConvertToFindLanguage(culture))
.For(query)
.InField(f => f.Name, 5)
.UsingSynonyms()
.WithAndAsDefaultOperator()
.WildCardSearch($"*{query}*", f => f.Name)
.FuzzySearch($"*{query}*", f => f.Name, 5)
.FilterForVisitor()
.Filter(x =>
x.MatchTypeHierarchy(typeof(XXXXX)) |
x.MatchType(typeof(YYYYY)) |
x.MatchType(typeof(ZZZZZ)) |
x.MatchType(typeof(AAAAA))
)
.Take(pageSize < 1 ? 10 : pageSize)
.Track()
.ApplyBestBets();

#208223
Oct 17, 2019 20:51
Praful Jangid - Oct 18, 2019 3:40
What is the issue? You are not getting any results? Or best bet not working or synonym not working? Or what?
Vote:
 

Hi Dileep,

I don't think you can boost the results based on searched "synonym". Boosting works on fields of pages or blocks.

You can find more information

https://world.episerver.com/documentation/developer-guides/find/NET-Client-API/searching/Boosting-with-filters/

https://world.episerver.com/documentation/developer-guides/find/NET-Client-API/searching/Boosting-with-weights/

#208269
Oct 18, 2019 14:18
* 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.