Bug 22339: Fix search field mappings of MARC fixed fields
authorEre Maijala <ere.maijala@helsinki.fi>
Thu, 14 Mar 2019 11:31:34 +0000 (13:31 +0200)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 25 Apr 2019 10:32:09 +0000 (10:32 +0000)
commit0047ede37e46a3334c9c47d7ebaed848907b6890
tree174a232fc2b9c67d37963452da2f9bcd22cfc1eb
parentbdf0d85c1de9cbb37cc8a40b0b4a2e86633d3aaf
Bug 22339: Fix search field mappings of MARC fixed fields

Fixes handling of /0 selector in addition to several fixed field positions. Note that ff7-01-02 is in fact 00-01 in Zebra and that has been replicated here.

Test plan:
1. Before applying a patch, check from Elasticsearch (e.g. localhost:9200/koha_biblios/_search?q=_id:123) what is indexed in Elasticsearch for a record for date-entered-on-file, ff7-00, ff7-01, ff7-02 and lleader.
2. Apply the patch, update database and save the record again.
3. Verify that the contents of the forementioned fields is now correct in Elasticsearch.
4. Verify that tests pass:  prove -v t/Koha/SearchEngine/Elasticsearch.t

Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/SearchEngine/Elasticsearch.pm
admin/searchengine/elasticsearch/mappings.yaml
installer/data/mysql/atomicupdate/bug_22339.perl [new file with mode: 0644]
t/Koha/SearchEngine/Elasticsearch.t