forked from Cutlery/immich
select embedding by default
This commit is contained in:
parent
9d886cf9dc
commit
5def1ebc53
@ -11,11 +11,6 @@ export class SmartSearchEntity {
|
|||||||
assetId!: string;
|
assetId!: string;
|
||||||
|
|
||||||
@Index('clip_index', { synchronize: false })
|
@Index('clip_index', { synchronize: false })
|
||||||
@Column({
|
@Column({ type: 'float4', array: true, transformer: { from: (v) => JSON.parse(v), to: (v) => v } })
|
||||||
type: 'float4',
|
|
||||||
array: true,
|
|
||||||
select: false,
|
|
||||||
transformer: { from: (v) => JSON.parse(v), to: (v) => v },
|
|
||||||
})
|
|
||||||
embedding!: number[];
|
embedding!: number[];
|
||||||
}
|
}
|
||||||
|
@ -179,11 +179,7 @@ export class SearchService {
|
|||||||
async handleSearchDuplicates({ id }: IEntityJob): Promise<JobStatus> {
|
async handleSearchDuplicates({ id }: IEntityJob): Promise<JobStatus> {
|
||||||
const { machineLearning } = await this.configCore.getConfig();
|
const { machineLearning } = await this.configCore.getConfig();
|
||||||
|
|
||||||
const [asset] = await this.assetRepository.getByIds(
|
const asset = await this.assetRepository.getById(id, { smartSearch: true });
|
||||||
[id],
|
|
||||||
{ smartSearch: true },
|
|
||||||
{ smartSearch: { assetId: true, embedding: true } },
|
|
||||||
);
|
|
||||||
if (!asset) {
|
if (!asset) {
|
||||||
this.logger.error(`Asset ${id} not found`);
|
this.logger.error(`Asset ${id} not found`);
|
||||||
return JobStatus.FAILED;
|
return JobStatus.FAILED;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user