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)
committerJoy Nelson <joy@bywatersolutions.com>
Mon, 4 May 2020 21:05:58 +0000 (21:05 +0000)
commitb216f20dd684c80663567b17f9005e79e113abb2
treea23422f8b05fbf4edfa0f283889ec8a8015c7618
parent61b348118ada5a1520a2ad44ae7697a30be9f885
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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Koha/SearchEngine/Elasticsearch.pm