LP#1528901: avoid accidental bib fingerprint collisions user/kmlussier/lp1528901_more_precise-fingerprinting_signoff
authorGalen Charlton <gmc@esilibrary.com>
Fri, 28 Oct 2016 17:00:45 +0000 (13:00 -0400)
committerKathy Lussier <klussier@masslnc.org>
Wed, 8 Feb 2017 05:34:18 +0000 (00:34 -0500)
commitb73f3181006454993aa4488c933ff83cd4663189
treeae140bf151e186ab21b7b88a49918f72720fbe76
parenta6f1a4f27402a1b255b6876df76b73f33238af4e
LP#1528901: avoid accidental bib fingerprint collisions

This patch fixes a problem where the bib fingerprint algorithm
could end up putting completely different works in the same
metarecord. For example,

100 $a Steel, Danielle
245 $a Blue

and

*no 1XX
245 $a Blue steel

previously (with stock config.biblio_fingerprint settings) got
a fingerprint of "bluesteel". With this patch, their fingerprints
are now:

"Title:blue Author:steel"

and

"Title:bluesteel Author:"

The upgrade script supplied with this patch remaps the metarecords
after updating the fingerprints. While existing metarecord holds
may get moved, note that there is no known way of ensuring that a
metarecord hold placed on a collided metarecord will end up attach
to whatever work the patron intended to request.

To test:

[1] Add records for "Blue" and "Blue steel".
[2] Note that they end up on the same metarecord.
[3] Apply the patch and perform the update.
[4] The two bibs should now be on separate metarecords.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Rogan Hamby <rogan.hamby@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/sql/Pg/030.schema.metabib.sql
Open-ILS/src/sql/Pg/t/lp1528901_more_precise_fingerprints.pg [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.update_fingerprinting.sql [new file with mode: 0644]