mirror of
https://github.com/immich-app/immich.git
synced 2026-03-06 18:17:27 +03:00
feat(server): separate face search relation (#10371)
* wip * various fixes * new migration * fix test * add face search entity, update sql * update e2e * set storage to external
This commit is contained in:
@@ -14,7 +14,6 @@ import {
|
||||
PersonStatistics,
|
||||
UpdateFacesData,
|
||||
} from 'src/interfaces/person.interface';
|
||||
import { asVector } from 'src/utils/database';
|
||||
import { Instrumentation } from 'src/utils/instrumentation';
|
||||
import { Paginated, PaginationOptions, paginate } from 'src/utils/pagination';
|
||||
import { FindManyOptions, FindOptionsRelations, FindOptionsSelect, In, Repository } from 'typeorm';
|
||||
@@ -249,10 +248,8 @@ export class PersonRepository implements IPersonRepository {
|
||||
}
|
||||
|
||||
async createFaces(entities: AssetFaceEntity[]): Promise<string[]> {
|
||||
const res = await this.assetFaceRepository.insert(
|
||||
entities.map((entity) => ({ ...entity, embedding: () => asVector(entity.embedding, true) })),
|
||||
);
|
||||
return res.identifiers.map((row) => row.id);
|
||||
const res = await this.assetFaceRepository.save(entities);
|
||||
return res.map((row) => row.id);
|
||||
}
|
||||
|
||||
async update(entity: Partial<PersonEntity>): Promise<PersonEntity> {
|
||||
|
||||
Reference in New Issue
Block a user