From e54c18367bd77dd4f5a3b206ba92daebd4684b4c Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Sun, 30 Jun 2024 17:36:02 +0200 Subject: [PATCH] chore: Lower default duplicate detection distance (#10703) --- server/src/config.ts | 2 +- server/src/services/duplicate.service.spec.ts | 4 ++-- server/src/services/system-config.service.spec.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/src/config.ts b/server/src/config.ts index b420fe43ea..7b4fa6ebfd 100644 --- a/server/src/config.ts +++ b/server/src/config.ts @@ -258,7 +258,7 @@ export const defaults = Object.freeze({ }, duplicateDetection: { enabled: true, - maxDistance: 0.0155, + maxDistance: 0.01, }, facialRecognition: { enabled: true, diff --git a/server/src/services/duplicate.service.spec.ts b/server/src/services/duplicate.service.spec.ts index cbde4ea777..eada2fffcf 100644 --- a/server/src/services/duplicate.service.spec.ts +++ b/server/src/services/duplicate.service.spec.ts @@ -214,7 +214,7 @@ describe(SearchService.name, () => { expect(searchMock.searchDuplicates).toHaveBeenCalledWith({ assetId: assetStub.hasEmbedding.id, embedding: assetStub.hasEmbedding.smartSearch!.embedding, - maxDistance: 0.0155, + maxDistance: 0.01, type: assetStub.hasEmbedding.type, userIds: [assetStub.hasEmbedding.ownerId], }); @@ -240,7 +240,7 @@ describe(SearchService.name, () => { expect(searchMock.searchDuplicates).toHaveBeenCalledWith({ assetId: assetStub.hasEmbedding.id, embedding: assetStub.hasEmbedding.smartSearch!.embedding, - maxDistance: 0.0155, + maxDistance: 0.01, type: assetStub.hasEmbedding.type, userIds: [assetStub.hasEmbedding.ownerId], }); diff --git a/server/src/services/system-config.service.spec.ts b/server/src/services/system-config.service.spec.ts index 3bafd60a73..78e29571b4 100644 --- a/server/src/services/system-config.service.spec.ts +++ b/server/src/services/system-config.service.spec.ts @@ -81,7 +81,7 @@ const updatedConfig = Object.freeze({ }, duplicateDetection: { enabled: true, - maxDistance: 0.0155, + maxDistance: 0.01, }, facialRecognition: { enabled: true,