Bug 25050: Adjust marc_records_to_documents to search entire mapping array
authorNick Clemens <nick@bywatersolutions.com>
Fri, 3 Apr 2020 12:14:27 +0000 (12:14 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 14 Apr 2020 07:22:33 +0000 (08:22 +0100)
commita22315ef6153d5c64b4dfd763cf6802a3035e941
tree598c33dd76a3ffecd96e7eb253f47a8f44568bdb
parentf7cb46560322ef77858c6f489ae332962942616d
Bug 25050: Adjust marc_records_to_documents to search entire mapping array

There was an assumption in the ES code that match-heading mappings will appear in
a specified portion of the mappings array.

Certain mappings setups will not meet this assumption.
We need to move our searching up one level

The key seems to be having a mapping for a complete field, say 150, in both the
match-heading and another field as well as having mappings for ungrouped fields like
150a 150ab etc.

The unit test coverage should be sufficient for testing

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/SearchEngine/Elasticsearch.pm