Koha-clms/Koha
Jacek Ablewicz 13ee28896d Bug 14456: EmbedSeeFromHeadings record filter shouldn't process MARC holding fields
If the system preference IncludeSeeFromInSearches is enabled, records
exported for zebra indexing are being additionally processed by
EmbedSeeFromHeadings record filter (right now used only in rebuild_zebra.pl
script). This filter embeds 'see from' fields (extracted from authority
records linked with the given biblio via $9 subfields) into target MARC
record, which is then subsequently indexed in zebra.

Currently all fields containing $9 are getting the same exact treatment
by this filter. But on the export stage when the filter is applied, MARC
record being processed already does have holdings data fields added in
the previous stage (usually 952 / 995, depending on the MARC format).
Problem is that holdings data fields use to have $9 subfields in them
as well (mapped to item.itemnumber by default). As a consequence, some
(great many in the typical setup) records exported for zebra indexing
may have surplus "see from" fields added erroneously in semi-random
fashion, so biblio searches would often return some completely
unexpected additional results.

EmbedSeeFromHeadings record filter should not process holdings fields
when dealing with MARC records intended for zebra indexing.

To reproduce:

1) database with as many sample or real-world biblio, item and authority
records as possible is recommended for testing purposes
2) enable IncludeSeeFromInSearches
3) export a bunch of biblio records for zebra (e.g.:
misc/migration_tools/rebuild_zebra.pl -I -b -x -k -length=1000),
inspect the result xml records in /tmp/<whatever> file; observe that at
the end of many records, here and there some extra "see from" (= 1st
indicator: 'z') fields tend to appear, which shouldn't be there ;)

To test:

4) apply patch
5) redo 3)
6) compare results from 3) and 5) with diff

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I introduced a regression test for this. You should run the tests
without/with the patch and verify that the patch actually fixes the problem.
Good job Jacek! I'm sure writing the regression test would take less time
than such a detailed commit message!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f3a8b7a0e1)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
2015-08-28 14:55:24 +12:00
..
Borrower Bug 11287: make patron import tool take new restrictions system into account 2014-05-05 22:37:12 +00:00
Cache Bug 9434: Introduce new tied cache system 2013-03-20 15:15:44 -04:00
Filter/MARC Bug 14456: EmbedSeeFromHeadings record filter shouldn't process MARC holding fields 2015-08-28 14:55:24 +12:00
Indexer Bug 10143 - Fixing license headers 2013-05-01 06:47:50 -04:00
List Bug 15065: (follow-up) update license header 2013-10-14 21:50:10 +00:00
Plugins Bug 14467 - Security updates break some Koha plugins 2015-07-26 01:20:15 +12:00
QueryParser/Driver Bug 12647: PQF QueryParser driver and unit tests fixes 2015-07-26 01:20:19 +12:00
RecordProcessor Bug 7417: Include see from references in bibliographic searches 2012-09-13 14:19:28 +02:00
Schema/Result Bug 13523: DBIC updates 2015-03-26 14:32:12 +13:00
SearchEngine Bug 12151: Remove uses of smartmatch operator from Koha/Solr/QueryBuilder.pm 2014-09-23 20:51:36 +00:00
SuggestionEngine Bug 9239: Allow the use of QueryParser for all queries 2013-03-16 21:32:32 -04:00
Template/Plugin Bug 12411: Preferences values should be utf8 encoded 2015-07-26 01:20:19 +12:00
Util Bug 5202: QA follow-up: quiet warnings 2013-10-10 21:36:59 +00:00
AuthUtils.pm Bug 9611: (follow-up) move new password hashing routines to separate module 2013-10-09 03:29:22 +00:00
Authority.pm Bug 5202: QA follow-up - correct license and POD errors 2013-10-10 21:39:15 +00:00
Cache.pm Revert "Bug 13431 - Shared FastMmap file causes issues" 2015-02-28 03:20:42 +13:00
Calendar.pm Bug 11112: (follow-up) add FIXME 2013-12-10 18:21:09 +00:00
Database.pm Bug 13645: Cache the DBIx connection 2015-05-29 17:53:40 +12:00
DateUtils.pm Bug 11148: Add a as_due_date parameter to the output_pref routine 2014-04-18 21:45:45 +00:00
I18N.pm Bug 11848: (follow-up) update license statment 2014-05-05 04:51:42 +00:00
Linktracker.pm Bug 8917 : [ Sign followup ] Track clicks to links external to Koha 2013-03-07 11:14:25 -05:00
MetadataRecord.pm Bug 9755 QA follow-up: move MARC-specific functionality to utility class 2013-07-23 23:10:21 +00:00
Plugins.pm Bug 9907 - Plugins test dies early on some servers 2013-03-22 17:50:09 -04:00
RecordProcessor.pm Bug 7417: Include see from references in bibliographic searches 2012-09-13 14:19:28 +02:00
Schema.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
SearchEngine.pm Bug 11015: add copyright headers to some files 2013-10-21 21:45:00 +00:00
SimpleMARC.pm Bug 11478: Replace experimental given/when keywords 2014-02-20 15:52:57 +00:00
SuggestionEngine.pm Bug 8726: ExplodedTerms suggestion plugin (functionality) 2012-09-28 17:08:21 +02:00