https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38270

--- Comment #7 from David Cook <[email protected]> ---
Created attachment 174320
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174320&action=edit
Bug 38270: Add MARCXML and MARCXML_COMPRESSED to ElasticsearchMARCFormat
syspref

This change adds MARCXML and MARCXML_COMPRESSED to the ElasticsearchMARCFormat
system preference.

Previously, MARCXML was a fallback format for base64ISO2709, but this provides
it as a valid choice in itself.

For storage and performance reasons, MARCXML_COMPRESSED is another alternative.
It uses the DEFLATE algorithm using the zlib library via C bindings. It is just
as fast as base64ISO2709 for indexing, and it's actually superior in terms of
storage, especially for large records which fallback to MARCXML.

Test plan:
0. Apply the patch
0b. Set up koha-testing-docker to use Elasticsearch
0c. koha-plack --restart kohadev
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?
op=search&searchfield=ElasticsearchMARCFormat
2. Switch the setting to "ISO2709"
3. Create a MARC record with a field over 9999 characters
4. Create a MARC record with a record length over 99999 (but individual
field length of under 32000 characters)
5. Reindex the database
6. Search for the records (using a keyword that matches these and other
records)
7. Note that the record with a field over 9999 characters is not properly
retrieved
8. Look on the detail page at "Elastic record" and note that the records use
a "marc_format" of "baseISO2709" and "MARCXML" respectively

9. Change "ElasticsearchMARCFormat" to "MARCXML"
10. Reindex the database
11. Note that the records now use a marc_format of "MARCXML" and both
records are now displaying properly in search

12. Change "ElasticsearchMARCFormat" to "MARCXML compressed using DEFLATE
algorithm"
13. Reindex the database
14. Note that the records now use a marc_format of "MARCXML_COMPRESSED" and
both records are now displaying properly in search

15. prove -v t/db_dependent/Koha/SearchEngine/Elasticsearch.t

*Bonus points*
- Create a record with 100 items with the same large note fields
- Using "ISO2709" note that the fallback is to "MARCXML" and the marc_data
field is very large
- Change to "MARCXML compressed using DEFLATE algorithm" and note that
the marc_data field is very small.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to