@@ -44,11 +44,9 @@ describe('search projection upgrade in PostgreSQL', () => {
4444 await sql . unsafe (
4545 `ALTER TABLE embedding_search ${ fields . map ( ( field ) => `DROP COLUMN ${ field } ` ) . join ( ', ' ) } `
4646 )
47- /** A workspace holds one search index, so each fixture index has its own. */
48- await sql `INSERT INTO knowledge_base (id, user_id, name, workspace_id, embedding_model, is_search_index) VALUES
49- ('prefix', 'reader', 'Prefix fixture', 'workspace', 'text-embedding-3-small', true),
50- ('full', 'reader', 'Full fixture', 'full-workspace', 'gemini-embedding-001', true),
51- ('legacy', 'reader', 'Legacy fixture', 'workspace', 'text-embedding-3-small', false)`
47+ await sql `INSERT INTO knowledge_base (id, user_id, name, workspace_id, embedding_model) VALUES
48+ ('prefix', 'reader', 'Prefix fixture', 'workspace', 'text-embedding-3-small'),
49+ ('full', 'reader', 'Full fixture', 'workspace', 'gemini-embedding-001')`
5250 await backfillEmbeddingSearch ( sql )
5351 await sql . unsafe ( `INSERT INTO embedding
5452 (id, knowledge_base_id, document_id, chunk_index, chunk_hash, content, content_length, token_count, start_offset, end_offset, embedding)
@@ -155,22 +153,6 @@ describe('search projection upgrade in PostgreSQL', () => {
155153 expect ( await backfillSearchKeywords ( sql ) ) . toBe ( 0 )
156154 } )
157155
158- it ( 'leaves the chunks of a base that is not a search index unfilled' , async ( ) => {
159- await sql . unsafe ( `INSERT INTO embedding
160- (id, knowledge_base_id, document_id, chunk_index, chunk_hash, content, content_length, token_count, start_offset, end_offset, embedding)
161- VALUES ('legacy-chunk', 'legacy', 'legacy-document', 0, 'legacy-hash', 'Synthetic fixture', 17, 4, 0, 17,
162- array_fill(0.01::real, ARRAY[1536])::vector(1536))` )
163- await sql `DELETE FROM embedding_keyword_search WHERE id = 'legacy-chunk'`
164- try {
165- expect ( await backfillSearchKeywords ( sql ) ) . toBe ( 0 )
166- expect (
167- await sql `SELECT id FROM embedding_keyword_search WHERE id = 'legacy-chunk'`
168- ) . toHaveLength ( 0 )
169- } finally {
170- await sql `DELETE FROM embedding WHERE id = 'legacy-chunk'`
171- }
172- } )
173-
174156 it ( 'repairs an interrupted index build and preserves valid indexes on replay' , async ( ) => {
175157 await expect (
176158 sql . unsafe (
0 commit comments