refactor: remove smart search entity (#17447)

refactor: smart search entity
This commit is contained in:
Jason Rasmussen 2025-04-08 09:56:45 -04:00 committed by GitHub
parent 2b131fe935
commit fdbe6d649f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 125 additions and 134 deletions

View file

@ -179,6 +179,37 @@ from
where
"livePhotoVideoId" = $1::uuid
-- AssetRepository.getAssetForSearchDuplicatesJob
select
"id",
"type",
"ownerId",
"duplicateId",
"stackId",
"isVisible",
"smart_search"."embedding",
(
select
coalesce(json_agg(agg), '[]')
from
(
select
"asset_files".*
from
"asset_files"
where
"asset_files"."assetId" = "assets"."id"
and "asset_files"."type" = $1
) as agg
) as "files"
from
"assets"
left join "smart_search" on "assets"."id" = "smart_search"."assetId"
where
"assets"."id" = $2::uuid
limit
$3
-- AssetRepository.getById
select
"assets".*