This patch implements a suggestion by Dan Wells and builds on Mike
Rylander's patch to skip inserting into field_entry and facet
indexes values that have been normalized to NULL. As a side effect,
the following warning will no longer be logged when attempting
to store such values in the facet index:
WARNING: Use of uninitialized value in subroutine entry at /usr/lib/perl/5.18/Unicode/Normalize.pm line 80.
CONTEXT: PL/Perl function "force_unicode_normal_form"
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
END IF;
FOR ind_data IN SELECT * FROM biblio.extract_metabib_field_entry( bib_id ) LOOP
+
+ -- don't store what has been normalized away
+ CONTINUE WHEN ind_data.value IS NULL;
+
IF ind_data.field < 0 THEN
ind_data.field = -1 * ind_data.field;
END IF;
-- expensive to add a comparison of index_vector to index_vector
-- to the WHERE clause below.
- CONTINUE WHEN ind_data.value IS NULL OR ind_data.sort_value IS NULL;
+ CONTINUE WHEN ind_data.sort_value IS NULL;
value_prepped := metabib.browse_normalize(ind_data.value, ind_data.field);
SELECT INTO mbe_row * FROM metabib.browse_entry
END IF;
FOR ind_data IN SELECT * FROM biblio.extract_metabib_field_entry( bib_id ) LOOP
+
+ -- don't store what has been normalized away
+ CONTINUE WHEN ind_data.value IS NULL;
+
IF ind_data.field < 0 THEN
ind_data.field = -1 * ind_data.field;
END IF;
-- expensive to add a comparison of index_vector to index_vector
-- to the WHERE clause below.
- CONTINUE WHEN ind_data.value IS NULL OR ind_data.sort_value IS NULL;
+ CONTINUE WHEN ind_data.sort_value IS NULL;
value_prepped := metabib.browse_normalize(ind_data.value, ind_data.field);
SELECT INTO mbe_row * FROM metabib.browse_entry