November Happy Hour will be moved to Thursday December 5th.
Hello guys,
I'm looking for a way to boost my pages based on their depth (the higher up the page, the higher the boost).
For example:
Current function:
public static SearchItems SiteSearch(string q, int? p, int pageSize) { p = p ?? 1; var results = SearchClient.Instance.UnifiedSearchFor(q) .ApplyBestBets() .Filter(x => !x.MatchType(typeof(ImageFile))) .BoostMatching(x => x.MatchTypeHierarchy(typeof(SitePageData)), 1) .Skip((p - 1) * pageSize ?? 0) .Take(pageSize) .StaticallyCacheFor(TimeSpan.FromHours(1)) .GetResult(); return new SearchItems { SearchResults = results.Select(x => new SearchItem(x)).ToList(), ExecutionTimeInMS = results.ProcessingInfo.ServerDuration, NumberOfHits = results.TotalMatching }; }
Thanks in advance!
Hello guys,
I'm looking for a way to boost my pages based on their depth (the higher up the page, the higher the boost).
For example:
Current function:
Thanks in advance!