1
0
forked from Cutlery/immich

select embedding by default

This commit is contained in:
mertalev 2024-04-02 18:56:42 -04:00
parent 9d886cf9dc
commit 5def1ebc53
No known key found for this signature in database
GPG Key ID: 9181CD92C0A1C5E3
2 changed files with 2 additions and 11 deletions

View File

@ -11,11 +11,6 @@ export class SmartSearchEntity {
assetId!: string;
@Index('clip_index', { synchronize: false })
@Column({
type: 'float4',
array: true,
select: false,
transformer: { from: (v) => JSON.parse(v), to: (v) => v },
})
@Column({ type: 'float4', array: true, transformer: { from: (v) => JSON.parse(v), to: (v) => v } })
embedding!: number[];
}

View File

@ -179,11 +179,7 @@ export class SearchService {
async handleSearchDuplicates({ id }: IEntityJob): Promise<JobStatus> {
const { machineLearning } = await this.configCore.getConfig();
const [asset] = await this.assetRepository.getByIds(
[id],
{ smartSearch: true },
{ smartSearch: { assetId: true, embedding: true } },
);
const asset = await this.assetRepository.getById(id, { smartSearch: true });
if (!asset) {
this.logger.error(`Asset ${id} not found`);
return JobStatus.FAILED;