mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: remove smart search entity (#17447)
refactor: smart search entity
This commit is contained in:
parent
2b131fe935
commit
fdbe6d649f
10 changed files with 125 additions and 134 deletions
|
|
@ -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".*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue