mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
update sql
This commit is contained in:
parent
a459632420
commit
17bdecbd9f
1 changed files with 8 additions and 7 deletions
|
|
@ -103,20 +103,21 @@ begin
|
||||||
set
|
set
|
||||||
local vchordrq.probes = 1
|
local vchordrq.probes = 1
|
||||||
select
|
select
|
||||||
"asset".*
|
"asset".*,
|
||||||
|
smart_search.embedding <=> $1 as "distance"
|
||||||
from
|
from
|
||||||
"asset"
|
"asset"
|
||||||
inner join "asset_exif" on "asset"."id" = "asset_exif"."assetId"
|
inner join "asset_exif" on "asset"."id" = "asset_exif"."assetId"
|
||||||
inner join "smart_search" on "asset"."id" = "smart_search"."assetId"
|
inner join "smart_search" on "asset"."id" = "smart_search"."assetId"
|
||||||
where
|
where
|
||||||
"asset"."visibility" = $1
|
"asset"."visibility" = $2
|
||||||
and "asset"."fileCreatedAt" >= $2
|
and "asset"."fileCreatedAt" >= $3
|
||||||
and "asset_exif"."lensModel" = $3
|
and "asset_exif"."lensModel" = $4
|
||||||
and "asset"."ownerId" = any ($4::uuid[])
|
and "asset"."ownerId" = any ($5::uuid[])
|
||||||
and "asset"."isFavorite" = $5
|
and "asset"."isFavorite" = $6
|
||||||
and "asset"."deletedAt" is null
|
and "asset"."deletedAt" is null
|
||||||
order by
|
order by
|
||||||
smart_search.embedding <=> $6
|
"distance"
|
||||||
limit
|
limit
|
||||||
$7
|
$7
|
||||||
offset
|
offset
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue