set probes

This commit is contained in:
mertalev
2025-05-09 15:01:11 -04:00
parent c80b16d24e
commit b750440f90
8 changed files with 180 additions and 169 deletions
+12 -6
View File
@@ -64,6 +64,7 @@ limit
$15
-- SearchRepository.searchSmart
begin
select
"assets".*
from
@@ -83,8 +84,10 @@ limit
$7
offset
$8
rollback
-- SearchRepository.searchDuplicates
begin
with
"cte" as (
select
@@ -102,18 +105,20 @@ with
and "assets"."id" != $5::uuid
and "assets"."stackId" is null
order by
smart_search.embedding <=> $6
"distance"
limit
$7
$6
)
select
*
from
"cte"
where
"cte"."distance" <= $8
"cte"."distance" <= $7
rollback
-- SearchRepository.searchFaces
begin
with
"cte" as (
select
@@ -129,16 +134,17 @@ with
"assets"."ownerId" = any ($2::uuid[])
and "assets"."deletedAt" is null
order by
face_search.embedding <=> $3
"distance"
limit
$4
$3
)
select
*
from
"cte"
where
"cte"."distance" <= $5
"cte"."distance" <= $4
commit
-- SearchRepository.searchPlaces
select