Skip to content

High performance self-hosted photo and video management solution.

fix(server): merged faces cannot be recognized in new photos (#3381)

Alexace755f264a1
diff --git a/server/src/domain/person/person.service.ts b/server/src/domain/person/person.service.ts
index 3ec8356601..9f22cf96f5 100644
--- a/server/src/domain/person/person.service.ts
+++ b/server/src/domain/person/person.service.ts
@@ -145,6 +145,9 @@ export class PersonService {
}
}
+ // Re-index all faces in typesense for up-to-date search results
+ await this.jobRepository.queue({ name: JobName.SEARCH_INDEX_FACES });
+
return results;
}
diff --git a/server/src/domain/search/search.service.ts b/server/src/domain/search/search.service.ts
index 7a69ad8c21..64185ad51d 100644
--- a/server/src/domain/search/search.service.ts
+++ b/server/src/domain/search/search.service.ts
@@ -199,6 +199,7 @@ export class SearchService {
if (!this.enabled) {
return false;
}
+ await this.searchRepository.deleteAllFaces();
// TODO: do this in batches based on searchIndexVersion
const faces = this.patchFaces(await this.faceRepository.getAll());