Skip to content

Commit

Permalink
Activate temp_tour_full_text
Browse files Browse the repository at this point in the history
  • Loading branch information
martinheppner committed Nov 3, 2024
1 parent 19b849a commit 25a9ad2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jobs/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -885,8 +885,8 @@ export async function syncTours(){
await knex.raw(`UPDATE kpi SET VALUE=0 WHERE name='total_tours';`);

// This is to store away the vectors. If full_text is not changed, we do not have to recalculate them.
// await knex.raw(`DROP TABLE IF EXISTS temp_tour_full_text;`);
// await knex.raw(`CREATE TABLE temp_tour_full_text AS SELECT id, full_text, ai_search_column FROM tour WHERE ai_search_column IS NOT NULL;`);
await knex.raw(`DROP TABLE IF EXISTS temp_tour_full_text;`);
await knex.raw(`CREATE TABLE temp_tour_full_text AS SELECT id, full_text, ai_search_column FROM tour WHERE ai_search_column IS NOT NULL;`);

// Table tours will be rebuild from scratch
await knex.raw(`TRUNCATE tour;`);
Expand Down

0 comments on commit 25a9ad2

Please sign in to comment.