fix(server): search duplicates of the same asset type (#9747)

* search by type

* make sql

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Mert
2024-05-26 18:04:23 -04:00
committed by GitHub
parent 50f9b2d44e
commit e7c8501930
5 changed files with 16 additions and 6 deletions

View File

@@ -215,6 +215,7 @@ describe(SearchService.name, () => {
assetId: assetStub.hasEmbedding.id,
embedding: assetStub.hasEmbedding.smartSearch!.embedding,
maxDistance: 0.03,
type: assetStub.hasEmbedding.type,
userIds: [assetStub.hasEmbedding.ownerId],
});
expect(assetMock.updateDuplicates).toHaveBeenCalledWith({
@@ -240,6 +241,7 @@ describe(SearchService.name, () => {
assetId: assetStub.hasEmbedding.id,
embedding: assetStub.hasEmbedding.smartSearch!.embedding,
maxDistance: 0.03,
type: assetStub.hasEmbedding.type,
userIds: [assetStub.hasEmbedding.ownerId],
});
expect(assetMock.updateDuplicates).toHaveBeenCalledWith({