more dynamic repairs
authorBill Erickson <berickxx@gmail.com>
Wed, 2 Oct 2019 19:23:21 +0000 (15:23 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 15 Oct 2019 18:09:56 +0000 (14:09 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.elastic-search.sql

index dd74baf..d890540 100644 (file)
@@ -102,14 +102,14 @@ BEGIN
             SELECT 
                 cmf.field_class AS search_group, 
                 cmf.name, 
-                mfe.source, 
+                compiled.source, 
                 -- Index individual values instead of string-joined values
                 -- so they may be treated individually.  This is useful,
                 -- for example, when aggregating on subjects.
                 CASE WHEN cmf.joiner IS NOT NULL THEN
-                    REGEXP_SPLIT_TO_TABLE(mfe.value, cmf.joiner)
+                    REGEXP_SPLIT_TO_TABLE(compiled.value, cmf.joiner)
                 ELSE
-                    mfe.value
+                    compiled.value
                 END AS value
             FROM (
                 -- Extract the values from the source MARC record instead