avoid always printing "vector reindexing complete"

This commit is contained in:
mertalev 2025-05-13 12:56:03 -04:00
parent a96026c821
commit 1691706666
No known key found for this signature in database
GPG Key ID: DF6ABC77AAD98C95
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ The easiest option is to have both extensions installed during the migration:
2. [Install VectorChord][vchord-install] 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 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 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 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) 7. Uninstall pgvecto.rs (e.g. `apt-get purge vectors-pg14` on Debian-based environments, replacing `pg14` as appropriate)

View File

@ -222,7 +222,6 @@ export class DatabaseRepository {
if (promises.length > 0) { if (promises.length > 0) {
await Promise.all(promises); 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); SET DATA TYPE ${sql.raw(schema)}vector(${sql.raw(String(dimSize))})`.execute(tx);
await sql.raw(vectorIndexQuery({ vectorExtension, table, indexName, lists })).execute(tx); await sql.raw(vectorIndexQuery({ vectorExtension, table, indexName, lists })).execute(tx);
}); });
this.logger.log(`Reindexed ${indexName}`);
} }
private async setSearchPath(tx: Transaction<DB>): Promise<void> { private async setSearchPath(tx: Transaction<DB>): Promise<void> {