From 5a13f96b72351a9a62df896561eaff3052d7cb38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BAnar=20Vestmann?= <43557895+RunarVestmann@users.noreply.github.com> Date: Fri, 13 Dec 2024 11:57:40 +0000 Subject: [PATCH] fix(web): Sort by title for generic list and team list (#17226) * Add title.sort again * No need to have _score type --- libs/cms/src/lib/cms.elasticsearch.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/cms/src/lib/cms.elasticsearch.service.ts b/libs/cms/src/lib/cms.elasticsearch.service.ts index 0a20025d9ed0..2d1945a91db4 100644 --- a/libs/cms/src/lib/cms.elasticsearch.service.ts +++ b/libs/cms/src/lib/cms.elasticsearch.service.ts @@ -525,12 +525,14 @@ export class CmsElasticsearchService { const size = input.size ?? 10 - const sort: ('_score' | sortRule)[] = [ + const sort: sortRule[] = [ { [SortField.RELEASE_DATE]: { order: SortDirection.DESC, }, }, + // Sort items with equal values by ascending title order + { 'title.sort': { order: SortDirection.ASC } }, ] if (input.tags && input.tags.length > 0 && input.tagGroups) {