File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,10 +37,13 @@ stream.on('finish', async function () {
3737 console . log ( '\nSuccess!' ) ;
3838
3939 // create any indexes *after* loading initial data (skipping for this example)
40- // console.log('Creating index');
41- // await client.query("SET maintenance_work_mem = '8GB'");
42- // await client.query('SET max_parallel_maintenance_workers = 7');
43- // await client.query('CREATE INDEX ON items USING hnsw (embedding vector_cosine_ops)');
40+ const createIndex = false ;
41+ if ( createIndex ) {
42+ console . log ( 'Creating index' ) ;
43+ await client . query ( "SET maintenance_work_mem = '8GB'" ) ;
44+ await client . query ( 'SET max_parallel_maintenance_workers = 7' ) ;
45+ await client . query ( 'CREATE INDEX ON items USING hnsw (embedding vector_cosine_ops)' ) ;
46+ }
4447
4548 // update planner statistics for good measure
4649 await client . query ( 'ANALYZE items' ) ;
You can’t perform that action at this time.
0 commit comments