mirror of
https://github.com/immich-app/immich.git
synced 2026-03-06 10:07:48 +03:00
fix(server): skip stacked assets in duplicate detection (#16380)
* skip stacked assets in duplicate detection * update sql * handle stacking after duplicate detection runs
This commit is contained in:
@@ -794,6 +794,7 @@ export class AssetRepository {
|
||||
.where('assets.duplicateId', 'is not', null)
|
||||
.where('assets.deletedAt', 'is', null)
|
||||
.where('assets.isVisible', '=', true)
|
||||
.where('assets.stackId', 'is', null)
|
||||
.groupBy('assets.duplicateId'),
|
||||
)
|
||||
.with('unique', (qb) =>
|
||||
|
||||
@@ -318,6 +318,7 @@ export class SearchRepository {
|
||||
.where('assets.isVisible', '=', true)
|
||||
.where('assets.type', '=', type)
|
||||
.where('assets.id', '!=', asUuid(assetId))
|
||||
.where('assets.stackId', 'is', null)
|
||||
.orderBy(sql`smart_search.embedding <=> ${embedding}`)
|
||||
.limit(64),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user