mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
fix(server): reindex after changing to a model with a different dimension size (#10496)
reindex after truncating
This commit is contained in:
parent
1191978d50
commit
79a8ab71ef
1 changed files with 1 additions and 0 deletions
|
@ -315,6 +315,7 @@ export class SearchRepository implements ISearchRepository {
|
|||
await this.smartSearchRepository.manager.transaction(async (manager) => {
|
||||
await manager.clear(SmartSearchEntity);
|
||||
await manager.query(`ALTER TABLE smart_search ALTER COLUMN embedding SET DATA TYPE vector(${dimSize})`);
|
||||
await manager.query(`REINDEX INDEX clip_index`);
|
||||
});
|
||||
|
||||
this.logger.log(`Successfully updated database CLIP dimension size from ${curDimSize} to ${dimSize}.`);
|
||||
|
|
Loading…
Reference in a new issue