From 1691706666da6aa85a2c831eb1c5713e30cfedfa Mon Sep 17 00:00:00 2001 From: mertalev <101130780+mertalev@users.noreply.github.com> Date: Tue, 13 May 2025 12:56:03 -0400 Subject: [PATCH] avoid always printing "vector reindexing complete" --- docs/docs/administration/postgres-standalone.md | 2 +- server/src/repositories/database.repository.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/administration/postgres-standalone.md b/docs/docs/administration/postgres-standalone.md index 601c2270f9..13a6dbd7f0 100644 --- a/docs/docs/administration/postgres-standalone.md +++ b/docs/docs/administration/postgres-standalone.md @@ -76,7 +76,7 @@ The easiest option is to have both extensions installed during the migration: 2. [Install VectorChord][vchord-install] 3. Add `shared_preload_libraries= 'vchord.so, vectors.so'` to your `postgresql.conf`, making sure to include _both_ `vchord.so` and `vectors.so`. You may include other libraries here as well if needed 4. If Immich does not have superuser permissions, run the SQL command `CREATE EXTENSION vchord CASCADE;` using psql or your choice of database client -5. Start Immich and wait for the log `Vector reindexing complete` to be output +5. Start Immich and wait for the logs `Reindexed face_index` and `Reindexed clip_index` to be output 6. Remove the `vectors.so` entry from the `shared_preload_libraries` setting 7. Uninstall pgvecto.rs (e.g. `apt-get purge vectors-pg14` on Debian-based environments, replacing `pg14` as appropriate) diff --git a/server/src/repositories/database.repository.ts b/server/src/repositories/database.repository.ts index ac43ba39a7..f476f07d81 100644 --- a/server/src/repositories/database.repository.ts +++ b/server/src/repositories/database.repository.ts @@ -222,7 +222,6 @@ export class DatabaseRepository { if (promises.length > 0) { await Promise.all(promises); - this.logger.log('Vector reindexing complete'); } } @@ -255,6 +254,7 @@ export class DatabaseRepository { SET DATA TYPE ${sql.raw(schema)}vector(${sql.raw(String(dimSize))})`.execute(tx); await sql.raw(vectorIndexQuery({ vectorExtension, table, indexName, lists })).execute(tx); }); + this.logger.log(`Reindexed ${indexName}`); } private async setSearchPath(tx: Transaction): Promise {