The more content widget which uses the solr "more like this" endpoint for related content does not seem to honour the sort parameter, we wanted to show the latest entries
so for example
#set ($query = "%{ Sort = 'date desc', PageSize = $pageSize, PageIndex = $pageIndex}")
#if ($filters.Length > 0)
$query.Add('Filters', $filters)
#end
## perform query
#set ($items = false)
#set ($items = $core_v2_searchResult.GetRelatedContent($currentContent.ContentId.ToString(), $query))
I have tried this will all combinations of sort value
I have a couple of solr logs to confirm its getting to solr, but doesn’t seem to effect the results ?
2021-01-12 14:32:05.198 INFO (qtp315932542-19) [ x:verint-content] o.a.s.c.S.Request [verint-content] webapp=/solr path=/mlt params={mm=0&q=id:"c8656e93-356c-439b-9f2f-bf68cecd0d57"&fq=%2Btype:(blog)+%2Bgroup:(1)&fq=%2Broles:(1+OR+2+OR+3+OR+4+OR+8+OR+10+OR+11+OR+12+OR+16+OR+22+OR+25+OR+26+OR+29+OR+32+OR+36+OR+39+OR+43+OR+46+OR+49+OR+52+OR+55+OR+58+OR+61+OR+64+OR+67+OR+73+OR+833+OR+839+OR+848+OR+868+OR+869+OR+878+OR+891+OR+905+OR+911+OR+1007+OR+1018+OR+1029+OR+1044+OR+1050+OR+1089+OR+1106+OR+1165+OR+1171+OR+1242+OR+1290+OR+1338+OR+1343+OR+2343+OR+2347+OR+2350+OR+2353+OR+2379+OR+2462+OR+2463+OR+2464+OR+2480+OR+2497+OR+2500+OR+2503+OR+2504+OR+2505+OR+2507+OR+2529+OR+2547+OR+2553+OR+2559+OR+2583+OR+2625+OR+2626+OR+2627+OR+2628+OR+2629)
&sort=date+asc&rows=2} status=0 QTime=4
2021-01-12 14:32:24.314 INFO (qtp315932542-14) [ x:verint-content] o.a.s.c.S.Request [verint-content] webapp=/solr path=/mlt params={mm=0&q=id:"c8656e93-356c-439b-9f2f-bf68cecd0d57"&fq=%2Btype:(blog)+%2Bgroup:(1)&fq=%2Broles:(1+OR+2+OR+3+OR+4+OR+8+OR+10+OR+11+OR+12+OR+16+OR+22+OR+25+OR+26+OR+29+OR+32+OR+36+OR+39+OR+43+OR+46+OR+49+OR+52+OR+55+OR+58+OR+61+OR+64+OR+67+OR+73+OR+833+OR+839+OR+848+OR+868+OR+869+OR+878+OR+891+OR+905+OR+911+OR+1007+OR+1018+OR+1029+OR+1044+OR+1050+OR+1089+OR+1106+OR+1165+OR+1171+OR+1242+OR+1290+OR+1338+OR+1343+OR+2343+OR+2347+OR+2350+OR+2353+OR+2379+OR+2462+OR+2463+OR+2464+OR+2480+OR+2497+OR+2500+OR+2503+OR+2504+OR+2505+OR+2507+OR+2529+OR+2547+OR+2553+OR+2559+OR+2583+OR+2625+OR+2626+OR+2627+OR+2628+OR+2629)
&sort=date+desc&rows=2} status=0 QTime=2
I suspect that the solr /mlt end point does not support sorting after a bit of googling
Has anyone else tried this ?