Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
Hi,
I would like to sort results by published date in each facet returned by the results.
//Applying ReadAccess_Filter for the query
var query = SearchClient.Instance.Search<BasePage>(Language.Swedish).ForWithWildcards(Query)
.InField(x => x.PageName)
.AndInField(x => x.MainBody)
.BoostSummaryComments(10)
.AndInField(x => x.SearchText)
.InAllField()
.Track()
.Filter(ReadAccess_Filter)
.TermsFacetFor(x => x.SearchHitType, x => x.AllTerms=true);
Results = query.Select(x => new Hit {
Title = x.PageName,
Url = x.LinkURL,
Text = GetSnippet(
x.SearchText.AsHighlighted(GetHighlightSpec()),
x.SearchText.AsCropped(200)),
pubDate = x.StartPublish.GetTodayOrTomorrowOrTimeAndDate(),
Type = x.SearchHitType
}).GetResult();
rpFilter.DataSource = Results.TermsFacetFor<BasePage>(x => x.SearchHitType);
Any help is appreciated !