Skip to content

Commit

Permalink
fix(web): Sort by title for generic list and team list (#17226)
Browse files Browse the repository at this point in the history
* Add title.sort again

* No need to have _score type
  • Loading branch information
RunarVestmann authored Dec 13, 2024
1 parent 3719969 commit 5a13f96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/cms/src/lib/cms.elasticsearch.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5a13f96

Please sign in to comment.