Search function is broken after upgrade to v1.95.1 #2208

Closed
opened 2026-02-05 05:41:53 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @longbowapache on GitHub (Feb 21, 2024).

The bug

I'm using a seperated postgresql 16 with pgvecto.rs 0.20.0 installed, when I search in immuch, postgresql prints error logs:

│ 2024-02-21 17:47:20.265 CST [21983] ERROR:  operator does not exist: vectors.vector <=> unknown at character 3009
│ 2024-02-21 17:47:20.265 CST [21983] HINT:  No operator matches the given name and argument types. You might need to add explicit type  │  casts.
│ 2024-02-21 17:47:20.265 CST [21983] STATEMENT:  SELECT "asset"."id" AS "asset_id", "asset"."deviceAssetId" AS "asset_deviceAssetId",   │,"asset"."ownerId" AS "asset_ownerId", "asset"."libraryId" AS "asset_libraryId", "asset"."deviceId" AS "asset_deviceId", "asset"."type
│ " AS "asset_type", "asset"."originalPath" AS "asset_originalPath", "asset"."resizePath" AS "asset_resizePath", "asset"."webpPath" AS   │ "asset_webpPath", "asset"."thumbhash" AS "asset_thumbhash", "asset"."encodedVideoPath" AS "asset_encodedVideoPath", "asset"."createdA
│ t" AS "asset_createdAt", "asset"."updatedAt" AS "asset_updatedAt", "asset"."deletedAt" AS "asset_deletedAt", "asset"."fileCreatedAt"   │ AS "asset_fileCreatedAt", "asset"."localDateTime" AS "asset_localDateTime", "asset"."fileModifiedAt" AS "asset_fileModifiedAt", "asse
│ t"."isFavorite" AS "asset_isFavorite", "asset"."isArchived" AS "asset_isArchived", "asset"."isExternal" AS "asset_isExternal", "asset  │ "."isReadOnly" AS "asset_isReadOnly", "asset"."isOffline" AS "asset_isOffline", "asset"."checksum" AS "asset_checksum", "asset"."dura
│ tion" AS "asset_duration", "asset"."isVisible" AS "asset_isVisible", "asset"."livePhotoVideoId" AS "asset_livePhotoVideoId", "asset".  │ "originalFileName" AS "asset_originalFileName", "asset"."sidecarPath" AS "asset_sidecarPath", "asset"."stackId" AS "asset_stackId", "
│ exifInfo"."assetId" AS "exifInfo_assetId", "exifInfo"."description" AS "exifInfo_description", "exifInfo"."exifImageWidth" AS "exifIn  │ fo_exifImageWidth", "exifInfo"."exifImageHeight" AS "exifInfo_exifImageHeight", "exifInfo"."fileSizeInByte" AS "exifInfo_fileSizeInBy
│ te", "exifInfo"."orientation" AS "exifInfo_orientation", "exifInfo"."dateTimeOriginal" AS "exifInfo_dateTimeOriginal", "exifInfo"."mo  │ difyDate" AS "exifInfo_modifyDate", "exifInfo"."timeZone" AS "exifInfo_timeZone", "exifInfo"."latitude" AS "exifInfo_latitude", "exif
│ Info"."longitude" AS "exifInfo_longitude", "exifInfo"."projectionType" AS "exifInfo_projectionType", "exifInfo"."city" AS "exifInfo_c  │ ity", "exifInfo"."livePhotoCID" AS "exifInfo_livePhotoCID", "exifInfo"."autoStackId" AS "exifInfo_autoStackId", "exifInfo"."state" AS
│  "exifInfo_state", "exifInfo"."country" AS "exifInfo_country", "exifInfo"."make" AS "exifInfo_make", "exifInfo"."model" AS "exifInfo_  │ model", "exifInfo"."lensModel" AS "exifInfo_lensModel", "exifInfo"."fNumber" AS "exifInfo_fNumber", "exifInfo"."focalLength" AS "exif
│ Info_focalLength", "exifInfo"."iso" AS "exifInfo_iso", "exifInfo"."exposureTime" AS "exifInfo_exposureTime", "exifInfo"."profileDescr  │ iption" AS "exifInfo_profileDescription", "exifInfo"."colorspace" AS "exifInfo_colorspace", "exifInfo"."bitsPerSample" AS "exifInfo_b
│ itsPerSample", "exifInfo"."fps" AS "exifInfo_fps" FROM "assets" "asset" LEFT JOIN "exif" "exifInfo" ON "exifInfo"."assetId"="asset"."  │ id"  INNER JOIN "smart_search" "search" ON "search"."assetId"="asset"."id" WHERE ( 1=1 AND 1=1 AND 1=1 AND ("asset"."isVisible" = $1
│ AND "asset"."isArchived" = $2) AND "asset"."ownerId" IN ($3 ) ) AND ( "asset"."deletedAt" IS NULL ) ORDER BY "search"."embedding" <=>  │  $4 ASC LIMIT 101

The OS that Immich Server is running on

Fedora

Version of Immich Server

v1.95.1

Version of Immich Mobile App

v1.95.1

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

I'm using k3s.

Your .env content

I'm using k3s.

Reproduction steps

1. N/A

Additional information

No response

Originally created by @longbowapache on GitHub (Feb 21, 2024). ### The bug I'm using a seperated postgresql 16 with pgvecto.rs 0.20.0 installed, when I search in immuch, postgresql prints error logs: ``` │ 2024-02-21 17:47:20.265 CST [21983] ERROR: operator does not exist: vectors.vector <=> unknown at character 3009 │ 2024-02-21 17:47:20.265 CST [21983] HINT: No operator matches the given name and argument types. You might need to add explicit type │ casts. │ 2024-02-21 17:47:20.265 CST [21983] STATEMENT: SELECT "asset"."id" AS "asset_id", "asset"."deviceAssetId" AS "asset_deviceAssetId", │,"asset"."ownerId" AS "asset_ownerId", "asset"."libraryId" AS "asset_libraryId", "asset"."deviceId" AS "asset_deviceId", "asset"."type │ " AS "asset_type", "asset"."originalPath" AS "asset_originalPath", "asset"."resizePath" AS "asset_resizePath", "asset"."webpPath" AS │ "asset_webpPath", "asset"."thumbhash" AS "asset_thumbhash", "asset"."encodedVideoPath" AS "asset_encodedVideoPath", "asset"."createdA │ t" AS "asset_createdAt", "asset"."updatedAt" AS "asset_updatedAt", "asset"."deletedAt" AS "asset_deletedAt", "asset"."fileCreatedAt" │ AS "asset_fileCreatedAt", "asset"."localDateTime" AS "asset_localDateTime", "asset"."fileModifiedAt" AS "asset_fileModifiedAt", "asse │ t"."isFavorite" AS "asset_isFavorite", "asset"."isArchived" AS "asset_isArchived", "asset"."isExternal" AS "asset_isExternal", "asset │ "."isReadOnly" AS "asset_isReadOnly", "asset"."isOffline" AS "asset_isOffline", "asset"."checksum" AS "asset_checksum", "asset"."dura │ tion" AS "asset_duration", "asset"."isVisible" AS "asset_isVisible", "asset"."livePhotoVideoId" AS "asset_livePhotoVideoId", "asset". │ "originalFileName" AS "asset_originalFileName", "asset"."sidecarPath" AS "asset_sidecarPath", "asset"."stackId" AS "asset_stackId", " │ exifInfo"."assetId" AS "exifInfo_assetId", "exifInfo"."description" AS "exifInfo_description", "exifInfo"."exifImageWidth" AS "exifIn │ fo_exifImageWidth", "exifInfo"."exifImageHeight" AS "exifInfo_exifImageHeight", "exifInfo"."fileSizeInByte" AS "exifInfo_fileSizeInBy │ te", "exifInfo"."orientation" AS "exifInfo_orientation", "exifInfo"."dateTimeOriginal" AS "exifInfo_dateTimeOriginal", "exifInfo"."mo │ difyDate" AS "exifInfo_modifyDate", "exifInfo"."timeZone" AS "exifInfo_timeZone", "exifInfo"."latitude" AS "exifInfo_latitude", "exif │ Info"."longitude" AS "exifInfo_longitude", "exifInfo"."projectionType" AS "exifInfo_projectionType", "exifInfo"."city" AS "exifInfo_c │ ity", "exifInfo"."livePhotoCID" AS "exifInfo_livePhotoCID", "exifInfo"."autoStackId" AS "exifInfo_autoStackId", "exifInfo"."state" AS │ "exifInfo_state", "exifInfo"."country" AS "exifInfo_country", "exifInfo"."make" AS "exifInfo_make", "exifInfo"."model" AS "exifInfo_ │ model", "exifInfo"."lensModel" AS "exifInfo_lensModel", "exifInfo"."fNumber" AS "exifInfo_fNumber", "exifInfo"."focalLength" AS "exif │ Info_focalLength", "exifInfo"."iso" AS "exifInfo_iso", "exifInfo"."exposureTime" AS "exifInfo_exposureTime", "exifInfo"."profileDescr │ iption" AS "exifInfo_profileDescription", "exifInfo"."colorspace" AS "exifInfo_colorspace", "exifInfo"."bitsPerSample" AS "exifInfo_b │ itsPerSample", "exifInfo"."fps" AS "exifInfo_fps" FROM "assets" "asset" LEFT JOIN "exif" "exifInfo" ON "exifInfo"."assetId"="asset"." │ id" INNER JOIN "smart_search" "search" ON "search"."assetId"="asset"."id" WHERE ( 1=1 AND 1=1 AND 1=1 AND ("asset"."isVisible" = $1 │ AND "asset"."isArchived" = $2) AND "asset"."ownerId" IN ($3 ) ) AND ( "asset"."deletedAt" IS NULL ) ORDER BY "search"."embedding" <=> │ $4 ASC LIMIT 101 ``` ### The OS that Immich Server is running on Fedora ### Version of Immich Server v1.95.1 ### Version of Immich Mobile App v1.95.1 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML I'm using k3s. ``` ### Your .env content ```Shell I'm using k3s. ``` ### Reproduction steps ```bash 1. N/A ``` ### Additional information _No response_
Author
Owner

@mmomjian commented on GitHub (Feb 21, 2024):

Please try the instructions at link. Specifically, for this issue try GRANT ALL ON SCHEMA vectors TO <immich user>;

Can you print the output of \dx, \dn+, \z, and \d+ when connected to the Immich DB?

@mmomjian commented on GitHub (Feb 21, 2024): Please try the instructions at [link](https://github.com/immich-app/immich/discussions/7252#discussioncomment-8534336). Specifically, for this issue try `GRANT ALL ON SCHEMA vectors TO <immich user>;` Can you print the output of `\dx`, `\dn+`, `\z`, and `\d+` when connected to the Immich DB?
Author
Owner

@longbowapache commented on GitHub (Feb 22, 2024):

Please try the instructions at link. Specifically, for this issue try GRANT ALL ON SCHEMA vectors TO <immich user>;

Can you print the output of \dx, \dn+, \z, and \d+ when connected to the Immich DB?

I have fixed the problem by following the instructions in the link. Thank you!

@longbowapache commented on GitHub (Feb 22, 2024): > Please try the instructions at [link](https://github.com/immich-app/immich/discussions/7252#discussioncomment-8534336). Specifically, for this issue try `GRANT ALL ON SCHEMA vectors TO <immich user>;` > > Can you print the output of `\dx`, `\dn+`, `\z`, and `\d+` when connected to the Immich DB? I have fixed the problem by following the instructions in the link. Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2208