Sorting in TermsFacet

Vote:
 

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 !

 

#82781
Mar 19, 2014 15:49
* 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.