mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04: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:
parent
4cf1e553d2
commit
d1e16025cf
@ -828,6 +828,7 @@ export class AssetRepository implements IAssetRepository {
|
|||||||
@@ PLAINTO_TSQUERY('english', :query)`,
|
@@ PLAINTO_TSQUERY('english', :query)`,
|
||||||
{ query },
|
{ query },
|
||||||
)
|
)
|
||||||
|
.addOrderBy('asset.fileCreatedAt', 'DESC')
|
||||||
.limit(numResults)
|
.limit(numResults)
|
||||||
.getRawMany();
|
.getRawMany();
|
||||||
|
|
||||||
|
@ -841,5 +841,7 @@ WHERE
|
|||||||
) @@ PLAINTO_TSQUERY('english', $3)
|
) @@ PLAINTO_TSQUERY('english', $3)
|
||||||
)
|
)
|
||||||
AND ("asset"."deletedAt" IS NULL)
|
AND ("asset"."deletedAt" IS NULL)
|
||||||
|
ORDER BY
|
||||||
|
"asset"."fileCreatedAt" DESC
|
||||||
LIMIT
|
LIMIT
|
||||||
250
|
250
|
||||||
|
Loading…
x
Reference in New Issue
Block a user