Reduce index bloat involving non-search_field values
authorBob Wicksall <bwicksall@pls-net.org>
Fri, 10 Aug 2012 14:53:11 +0000 (10:53 -0400)
committerDan Scott <dscott@laurentian.ca>
Thu, 16 Aug 2012 03:54:41 +0000 (23:54 -0400)
commitdeaf96795d2a0793dee1425e2edca1949ba27fc9
tree910447af76373a5284474b3f208e1ce607fe357e
parent409c2ebcc648ad32a66ab6d9d2c085744104ae56
Reduce index bloat involving non-search_field values

Rows in metabib.title_field_entry, subject_field_entry, series_field_entry,
and author_field_entry are doubled or tripled due to bad logic in
biblio.extract_metabib_field_entry. This results in these tables being 2 or
more times their correct size.

This was introduced in 2.2.0 when the logic for browse_field and facet_field
were added to biblio.extract_metabib_field_entry. 2.1 is not affected.

The duplicates are caused when biblio.extract_metabib_field_entry returns
TRUE in the search_field column for all rows even if they should just be
facet_field or browse_field after the first search_field value is returned.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/sql/Pg/030.schema.metabib.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.function.extract_metabib_field_entry.sql [new file with mode: 0644]