From 39b6b14d03d763c8b97ff299ebbe620ebc7e16ed Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Thu, 19 May 2022 08:59:14 -0400 Subject: [PATCH] create the unlogged table --- .../Pg/upgrade/XXXX.schema.dym_delayed_reify.sql | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.dym_delayed_reify.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.dym_delayed_reify.sql index 5401162322..9dc4b0c2e6 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.dym_delayed_reify.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.dym_delayed_reify.sql @@ -1,5 +1,26 @@ BEGIN; +-- INSERT-only table that catches updates to be reconciled +CREATE UNLOGGED TABLE search.symspell_dictionary_updates ( + transaction_id BIGINT, + keyword_count INT NOT NULL DEFAULT 0, + title_count INT NOT NULL DEFAULT 0, + author_count INT NOT NULL DEFAULT 0, + subject_count INT NOT NULL DEFAULT 0, + series_count INT NOT NULL DEFAULT 0, + identifier_count INT NOT NULL DEFAULT 0, + + prefix_key TEXT NOT NULL, + + keyword_suggestions TEXT[], + title_suggestions TEXT[], + author_suggestions TEXT[], + subject_suggestions TEXT[], + series_suggestions TEXT[], + identifier_suggestions TEXT[] +); +CREATE INDEX symspell_dictionary_updates_tid_idx ON search.symspell_dictionary_updates (transaction_id); + CREATE OR REPLACE FUNCTION search.disable_symspell_reification () RETURNS VOID AS $f$ INSERT INTO config.internal_flag (name,enabled) VALUES ('ingest.disable_symspell_reification',TRUE) -- 2.11.0