feat(search): add semantic search with embeddings and search mode toggle

This commit is contained in:
yiling
2026-05-28 20:14:11 +08:00
parent a39f793050
commit 2eb6ff6c0e
18 changed files with 384 additions and 44 deletions
+4 -2
View File
@@ -48,6 +48,7 @@ describe('CollectionService', () => {
operator: 'AND',
conditions: [{ field: 'name', operator: 'contains', value: 'test' }],
recursively: true,
searchMode: 'name',
},
},
})
@@ -68,6 +69,7 @@ describe('CollectionService', () => {
operator: 'AND',
conditions: [{ field: 'rating', operator: 'eq', value: 5 }],
recursively: true,
searchMode: 'name',
},
},
})
@@ -90,7 +92,7 @@ describe('CollectionService', () => {
name: `Collection ${i}`,
filter: {
sourceFolderId: project.rootFolder!,
searchFilter: { operator: 'AND', conditions: [], recursively: true },
searchFilter: { operator: 'AND', conditions: [], recursively: true, searchMode: 'name' },
},
})
}
@@ -128,7 +130,7 @@ describe('CollectionService', () => {
name: 'To be deleted',
filter: {
sourceFolderId: project.rootFolder!,
searchFilter: { operator: 'AND', conditions: [], recursively: true },
searchFilter: { operator: 'AND', conditions: [], recursively: true, searchMode: 'name' },
},
})