November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
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
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();