WIKI.logger.info(`(SEARCH/POSTGRES) Creating Words Suggestion Index...`)
WIKI.logger.info(`(SEARCH/POSTGRES) Creating Words Suggestion Index...`)
awaitWIKI.models.knex.raw(`
awaitWIKI.models.knex.raw(`
CREATE TABLE "pagesWords" AS SELECT word FROM ts_stat(
CREATE TABLE "pagesWords" AS SELECT word FROM ts_stat(
'SELECT to_tsvector(''simple'', pages."title") || to_tsvector(''simple'', pages."description") || to_tsvector(''simple'', pages."content") FROM pages WHERE pages."isPublished" AND NOT pages."isPrivate"'