[PR #3605] [MERGED] feat: use pgvecto.rs #10042

Closed
opened 2026-02-05 14:15:02 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/3605
Author: @jrasm91
Created: 8/8/2023
Status: Merged
Merged: 12/8/2023
Merged by: @mertalev

Base: mainHead: dev/pgvector


📝 Commits (10+)

📊 Changes

99 files changed (+1934 additions, -2582 deletions)

View changed files

📝 .github/workflows/test.yml (+3 -1)
📝 cli/src/api/open-api/api.ts (+5 -135)
📝 docker/docker-compose.dev.yml (+1 -14)
📝 docker/docker-compose.prod.yml (+1 -15)
📝 docker/docker-compose.test.yml (+1 -2)
📝 docker/docker-compose.yml (+1 -16)
📝 docker/example.env (+1 -2)
📝 docs/docs/developer/architecture.md (+0 -8)
📝 docs/docs/features/search.md (+3 -11)
📝 docs/docs/install/docker-compose.md (+0 -10)
📝 docs/docs/install/environment-variables.md (+4 -49)
📝 mobile/openapi/doc/SearchApi.md (+2 -22)
📝 mobile/openapi/lib/api/search_api.dart (+3 -73)
📝 mobile/openapi/test/search_api_test.dart (+1 -1)
📝 server/immich-openapi-specs.json (+0 -86)
📝 server/package-lock.json (+48 -96)
📝 server/package.json (+2 -1)
📝 server/src/domain/album/album.service.spec.ts (+0 -10)
📝 server/src/domain/album/album.service.ts (+0 -5)
📝 server/src/domain/asset/asset.service.spec.ts (+3 -35)

...and 79 more files

📄 Description

Migrate to pgvecto.rs

TODO:

  • Add postgres 15 migration guide
  • Upgrade to postgres 15
  • Database migration for vector embeddings to pgvecto.rs
  • Validate machine learning jobs with new database types
  • Upgrade FR to use pgvecto.rs
  • Upgrade CLIP to use pgvecto.rs
  • Upgrade explore page to use postgres (can happen in a separate PR)
  • Upgrade search page to use postgres for non-vector search (can happen in a separate PR)
  • Remove typesense code
  • Remove search jobs
  • Remove typesense documentation / environment variables
  • Handle changing embedding size
  • Add HNSW index
  • Add unit and e2e tests
  • Fix TypeORM migration action
  • Fix links at the bottom of the explore page (or temporarily remove)

Fixes #4714
Fixes #4780
Fixes #4929
Fixes #5033
Fixes #5079
Fixes #5084
Fixes #5261
Fixes #5464
Fixes #5550


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/3605 **Author:** [@jrasm91](https://github.com/jrasm91) **Created:** 8/8/2023 **Status:** ✅ Merged **Merged:** 12/8/2023 **Merged by:** [@mertalev](https://github.com/mertalev) **Base:** `main` ← **Head:** `dev/pgvector` --- ### 📝 Commits (10+) - [`c569ca8`](https://github.com/immich-app/immich/commit/c569ca867bc9c14b77c6c34ae22f7bcc9869b8d4) feat: pgvector - [`e8db5be`](https://github.com/immich-app/immich/commit/e8db5be9e087b2357a0a8db5bdc080bcc32408fe) use pgvecto.rs - [`3a44215`](https://github.com/immich-app/immich/commit/3a442151b91bedd70da87cf8c7b7c4bd3de88822) separate migrations for pgvecto.rs - [`69fab23`](https://github.com/immich-app/immich/commit/69fab23f881dfe2db1297f657dcd142343d63416) set k at startup - [`b81dfd7`](https://github.com/immich-app/immich/commit/b81dfd7e5d7a0480b0a53b9ea57c06e780d539c3) tag pgvecto.rs images - [`a33eddb`](https://github.com/immich-app/immich/commit/a33eddbddb2c4f2f3d4bb3e2e0c98b44c6460243) re-added search method interface - [`ff134b2`](https://github.com/immich-app/immich/commit/ff134b25c62e5f70d20ee4344864a61ac4067e56) updated getBuilder call - [`04b452d`](https://github.com/immich-app/immich/commit/04b452dd1f6b81ab8c40d2d120335c1f5e24841d) migration fixes - [`7920932`](https://github.com/immich-app/immich/commit/792093254f06ed636707bbe1e4d97ff4f834d4ee) avoid nested transaction in migration - [`0da7910`](https://github.com/immich-app/immich/commit/0da791046dac4d16db1a636f0e1e575fa27ed086) facial recognition fixes ### 📊 Changes **99 files changed** (+1934 additions, -2582 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test.yml` (+3 -1) 📝 `cli/src/api/open-api/api.ts` (+5 -135) 📝 `docker/docker-compose.dev.yml` (+1 -14) 📝 `docker/docker-compose.prod.yml` (+1 -15) 📝 `docker/docker-compose.test.yml` (+1 -2) 📝 `docker/docker-compose.yml` (+1 -16) 📝 `docker/example.env` (+1 -2) 📝 `docs/docs/developer/architecture.md` (+0 -8) 📝 `docs/docs/features/search.md` (+3 -11) 📝 `docs/docs/install/docker-compose.md` (+0 -10) 📝 `docs/docs/install/environment-variables.md` (+4 -49) 📝 `mobile/openapi/doc/SearchApi.md` (+2 -22) 📝 `mobile/openapi/lib/api/search_api.dart` (+3 -73) 📝 `mobile/openapi/test/search_api_test.dart` (+1 -1) 📝 `server/immich-openapi-specs.json` (+0 -86) 📝 `server/package-lock.json` (+48 -96) 📝 `server/package.json` (+2 -1) 📝 `server/src/domain/album/album.service.spec.ts` (+0 -10) 📝 `server/src/domain/album/album.service.ts` (+0 -5) 📝 `server/src/domain/asset/asset.service.spec.ts` (+3 -35) _...and 79 more files_ </details> ### 📄 Description Migrate to `pgvecto.rs` TODO: - [ ] ~~Add postgres 15 migration guide~~ - [ ] ~~Upgrade to postgres 15~~ - [x] Database migration for vector embeddings to `pgvecto.rs` - [x] Validate machine learning jobs with new database types - [x] Upgrade FR to use `pgvecto.rs` - [x] Upgrade CLIP to use `pgvecto.rs` - [x] Upgrade explore page to use postgres (can happen in a separate PR) - [x] Upgrade search page to use postgres for non-vector search (can happen in a separate PR) - [x] Remove typesense code - [x] Remove search jobs - [x] Remove typesense documentation / environment variables - [x] Handle changing embedding size - [x] Add HNSW index - [x] Add unit and e2e tests - [x] Fix TypeORM migration action - [x] Fix links at the bottom of the explore page (or temporarily remove) Fixes #4714 Fixes #4780 Fixes #4929 Fixes #5033 Fixes #5079 Fixes #5084 Fixes #5261 Fixes #5464 Fixes #5550 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:15:02 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#10042