You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-25 20:09:18 +02:00
fix(server): Fix incorrect sorting with search (#6031)
The search results are not sorted by date causing confision. Fixes #5916
This commit is contained in:
@@ -828,6 +828,7 @@ export class AssetRepository implements IAssetRepository {
|
||||
@@ PLAINTO_TSQUERY('english', :query)`,
|
||||
{ query },
|
||||
)
|
||||
.addOrderBy('asset.fileCreatedAt', 'DESC')
|
||||
.limit(numResults)
|
||||
.getRawMany();
|
||||
|
||||
|
@@ -841,5 +841,7 @@ WHERE
|
||||
) @@ PLAINTO_TSQUERY('english', $3)
|
||||
)
|
||||
AND ("asset"."deletedAt" IS NULL)
|
||||
ORDER BY
|
||||
"asset"."fileCreatedAt" DESC
|
||||
LIMIT
|
||||
250
|
||||
|
Reference in New Issue
Block a user