[open-ils-commits] r19755 - branches/rel_2_0/Open-ILS/src/sql/Pg (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 15 13:19:30 EDT 2011


Author: miker
Date: 2011-03-15 13:19:26 -0400 (Tue, 15 Mar 2011)
New Revision: 19755

Modified:
   branches/rel_2_0/Open-ILS/src/sql/Pg/reingest-1.6-2.0.pl
Log:
teach the 1.6-2.0 reingest generator about "tnf"-tag rows for title sorting

Modified: branches/rel_2_0/Open-ILS/src/sql/Pg/reingest-1.6-2.0.pl
===================================================================
--- branches/rel_2_0/Open-ILS/src/sql/Pg/reingest-1.6-2.0.pl	2011-03-15 17:18:43 UTC (rev 19754)
+++ branches/rel_2_0/Open-ILS/src/sql/Pg/reingest-1.6-2.0.pl	2011-03-15 17:19:26 UTC (rev 19755)
@@ -77,6 +77,21 @@
 
 sub header {
     print OUT q {
+\qecho First, make sure that the rows needed for title sorting are
+\qecho available.
+
+BEGIN; 
+DELETE FROM metabib.real_full_rec WHERE tag = 'tnf'; 
+INSERT INTO metabib.real_full_rec (record, tag, subfield, value) 
+   SELECT  record, 
+           'tnf', 
+           'a', 
+           SUBSTRING(value, COALESCE(NULLIF(REGEXP_REPLACE(ind2,'[^0-9]','','g'),''),'0')::int + 1) 
+     FROM  metabib.real_full_rec 
+     WHERE tag = '245' 
+           AND subfield = 'a'; 
+COMMIT;
+
 \qecho Do a partial reingest to fully populate metabib.facet_entry
 \qecho and update the keyword indexes to reflect changes in the default
 \qecho NACO normalization.  This can be time consuming on large databases.



More information about the open-ils-commits mailing list