Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Checked out auto boosting?
searchResult = client.Search<BlogPost>()
.For("Banana")
.UsingAutoBoost(TimeSpan.FromDays(14))
.GetResult();
That will increase hits from newly published at least. It will be applied to all page types though so might be an issue. Otherwise boosting news article from last x days might be another option? Similar to this:
var searchResult = client.Search<Car>()
.For("Volvo")
.BoostMatching(x => x.InStock.Match(true), 1.5)
.BoostMatching(x => x.SalesMargin.GreaterThan(0.2), 1.5)
.GetResult();
Hi Daniel,
Yes, I have tried autoboosting, it didn't work as I wanted..
I didnt quit understand the second exemple:
.BoostMatching(x => x.SalesMargin.GreaterThan(0.2), 1.5)
If I want to sort newspages after SearchPublishDate , so my oldest news rankes low in my list, how to do it with boosting ?
Ok too bad. With boost filters my idea was that if you boost the last month worth of news pages a little you will increase the probability of them ending up on top. Otherwise I can't see any other option than having a secondary search functionality just for news and displaying them separately. You can easily sort them by publication date
Tricky to support both sorting by relevance and sorting some specific pages by date in the same result. Not sure that is possible? Maybe someone else knows?
Alright, maybe I can get around it if I make the oldest newspages have the lowest score, like this.
So that the Newspages that are older then 2 years get a low score and ranks down the list, but what is the lowest score that I can use ?
Is my following code useable ?
.BoostMatching(x=>x.MatchType(typeof(NewsPage)) & x.SearchPublishDate.LessThan(DateTime.Now.AddYears(-2)),0.01d)
Yeah I would go with something like that. Easy and gets the job done good enough.
Hi,
Is there a way to sort NewsPages by updated date and other pages by score in the same results list, So that the oldest newpages get the lowest sort in the list ?
This is how my query looks like:
var query = querySearch
.UsingUnifiedWeights(GetWeightsValues())
.WithAndAsDefaultOperator()
.UsingSynonyms()
.ApplyBestBets()
.BoostMatching(x => x.MatchType(typeof(ContactPage)), 1.5d)
.BoostMatching(x => x.MatchType(typeof(ProgrammePage)), 1.5d)
.BoostMatching(x => x.MatchType(typeof(CoursePage)), 1.5d)
Thank you in advance!
/Suha