mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore(server): remove old asset search (#9104)
* chore(server): remove old asset search * chore: remove more unused search code
This commit is contained in:
parent
0c60aaf557
commit
5a49de5592
20 changed files with 30 additions and 1801 deletions
|
|
@ -738,37 +738,6 @@ WHERE
|
|||
LIMIT
|
||||
12
|
||||
|
||||
-- AssetRepository.searchMetadata
|
||||
SELECT
|
||||
asset.*,
|
||||
e.*,
|
||||
COALESCE("si"."tags", array[]::text[]) AS "tags",
|
||||
COALESCE("si"."objects", array[]::text[]) AS "objects"
|
||||
FROM
|
||||
"assets" "asset"
|
||||
INNER JOIN "exif" "e" ON asset."id" = e."assetId"
|
||||
LEFT JOIN "smart_info" "si" ON si."assetId" = asset."id"
|
||||
WHERE
|
||||
(
|
||||
"asset"."isVisible" = true
|
||||
AND "asset"."ownerId" IN ($1)
|
||||
AND "asset"."isArchived" = $2
|
||||
AND (
|
||||
(
|
||||
e."exifTextSearchableColumn" || COALESCE(
|
||||
si."smartInfoTextSearchableColumn",
|
||||
to_tsvector('english', '')
|
||||
)
|
||||
) @@ PLAINTO_TSQUERY('english', $3)
|
||||
OR asset."originalFileName" = $4
|
||||
)
|
||||
)
|
||||
AND ("asset"."deletedAt" IS NULL)
|
||||
ORDER BY
|
||||
"asset"."fileCreatedAt" DESC
|
||||
LIMIT
|
||||
250
|
||||
|
||||
-- AssetRepository.getAllForUserFullSync
|
||||
SELECT
|
||||
"asset"."id" AS "asset_id",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue