(file storage) File Storage Type for EXPORT data

(file storage) File Storage Type for EXPORT data
This commit is contained in:
Viktor Lofgren 2023-08-05 14:42:33 +02:00
parent 08eed17e66
commit cdfe284f9a
4 changed files with 8 additions and 3 deletions

View File

@ -9,5 +9,6 @@ public enum FileStorageType {
INDEX_LIVE,
LEXICON_LIVE,
BACKUP,
EXPORT,
SEARCH_SETS
}

View File

@ -13,7 +13,7 @@ CREATE TABLE IF NOT EXISTS FILE_STORAGE (
BASE_ID BIGINT NOT NULL,
PATH VARCHAR(255) NOT NULL COMMENT 'The path to the storage relative to the base',
DESCRIPTION VARCHAR(255) NOT NULL,
TYPE ENUM ('CRAWL_SPEC', 'CRAWL_DATA', 'PROCESSED_DATA', 'INDEX_STAGING', 'LEXICON_STAGING', 'INDEX_LIVE', 'LEXICON_LIVE', 'SEARCH_SETS', 'BACKUP') NOT NULL,
TYPE ENUM ('CRAWL_SPEC', 'CRAWL_DATA', 'PROCESSED_DATA', 'INDEX_STAGING', 'LEXICON_STAGING', 'INDEX_LIVE', 'LEXICON_LIVE', 'SEARCH_SETS', 'BACKUP', 'EXPORT') NOT NULL,
DO_PURGE BOOLEAN NOT NULL DEFAULT FALSE COMMENT 'If true, the storage may be cleaned',
CREATE_DATE TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
CONSTRAINT CONS UNIQUE (BASE_ID, PATH),

View File

@ -22,3 +22,7 @@ FROM FILE_STORAGE_BASE WHERE NAME='Index Storage';
INSERT IGNORE INTO FILE_STORAGE(BASE_ID, PATH, DESCRIPTION, TYPE)
SELECT ID, 'ss', "Search Sets", 'SEARCH_SETS'
FROM FILE_STORAGE_BASE WHERE NAME='Index Storage';
INSERT IGNORE INTO FILE_STORAGE(BASE_ID, PATH, DESCRIPTION, TYPE)
SELECT ID, 'export', "Exported Data", 'EXPORT'
FROM FILE_STORAGE_BASE WHERE TYPE='EXPORT';

View File

@ -18,7 +18,7 @@ function download_model {
pushd $(dirname $0)
mkdir -p model logs db samples install vol/ir/{0,1}/ vol/{lr,lw} vol/iw/{0,1}/search-sets vol/{tmpf,tmps} data
mkdir -p model logs db samples install vol/ir/{0,1}/ vol/{lr,lw} vol/iw/{0,1}/search-sets vol/{tmpf,tmps} data samples/export
download_model model/English.DICT https://raw.githubusercontent.com/datquocnguyen/RDRPOSTagger/master/Models/POS/English.DICT
download_model model/English.RDR https://raw.githubusercontent.com/datquocnguyen/RDRPOSTagger/master/Models/POS/English.RDR