fix(server): merged faces cannot be recognized in new photos (#3381)
* fix(server): merged faces cannot be recognized in new photos * fix: delete stale documents
This commit is contained in:
parent
7b25c9d0a7
commit
ace755f264
2 changed files with 4 additions and 0 deletions
|
@ -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;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -199,6 +199,7 @@ export class SearchService {
|
||||||
if (!this.enabled) {
|
if (!this.enabled) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
await this.searchRepository.deleteAllFaces();
|
||||||
|
|
||||||
// TODO: do this in batches based on searchIndexVersion
|
// TODO: do this in batches based on searchIndexVersion
|
||||||
const faces = this.patchFaces(await this.faceRepository.getAll());
|
const faces = this.patchFaces(await this.faceRepository.getAll());
|
||||||
|
|
Loading…
Reference in a new issue