Skip to content

Commit a5d1a78

Browse files
committed
Updating the helper functions
Updated added a view for fulltext search.
1 parent 69e58b1 commit a5d1a78

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

function/ndb/publicationtsv.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CREATE OR REPLACE VIEW ndb.pubtsv AS
2+
SELECT pu.publicationid,
3+
setweight(to_tsvector(coalesce(pu.articletitle,'')), 'A') ||
4+
setweight(to_tsvector(coalesce(pu.booktitle,'')), 'A') ||
5+
setweight(to_tsvector(coalesce(pu.journal,'')), 'B') ||
6+
setweight(to_tsvector(coalesce(pu.seriestitle,'')), 'B') ||
7+
setweight(to_tsvector(coalesce(pu.volumetitle,'')), 'B') ||
8+
setweight(to_tsvector(coalesce(pu.citation,'')), 'C') AS pubtsv
9+
FROM ndb.publications AS pu;

helpers/neofulldump.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ fi
77
now=`date +"%Y-%m-%d"`
88
mkdir -p dumps
99
mkdir -p archives
10-
pg_dump -Fc -O -h db5.cei.psu.edu -U $1 -N gen -N tmp -W -v -d neotoma > ./dumps/neotoma_dump_full_${now}.sql
10+
pg_dump -Fc -O -v -h db5.cei.psu.edu -U $1 -s neotoma > ./dumps/neotoma_ndb_schema_${now}.sql
11+
pg_dump -Fc -O -v -h db5.cei.psu.edu -U $1 -N gen -N tmp -W -v -d neotoma > ./dumps/neotoma_dump_full_${now}.sql
1112
tar -cvf ./archives/neotoma_dump_full_${now}.tar -C ./dumps neotoma_dump_full_${now}.sql
1213
rm ./dumps/neotoma_dump_full_${now}.sql
1314
pg_dump -Fc -O -h db5.cei.psu.edu -U $1 -N gen -n ndb -W -v -d neotoma > ./dumps/neotoma_dump_ndb_${now}.sql

0 commit comments

Comments
 (0)