diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 913d2d4a9..e58146ccf 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -149,7 +149,12 @@ const indexes: (ModelIndexesOptions & { where?: WhereOptions })[] = [ buildTrigramSearchIndex('video_name_trigram', 'name'), { fields: [ 'createdAt' ] }, - { fields: [ 'publishedAt' ] }, + { + fields: [ + { name: 'publishedAt', order: 'DESC' }, + { name: 'id', order: 'ASC' } + ] + }, { fields: [ 'duration' ] }, { fields: [ 'views' ] }, { fields: [ 'channelId' ] },