https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38252 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 211474 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211474&action=edit Bug 38252: Index the $w of 760, 762, 765, 767, 786 and 788 in Record-control-number The Record-control-number (rcn) index is meant to hold the $w of the linking entry fields, so that the records that link to a record can be searched for. It did not hold the $w of 760, 762, 765, 767, 786 and 788, although it holds the $w of 770, 772 to 777, 780, 785, 787, 800, 810, 811 and 830. Index them too, for Zebra and for Elasticsearch, and add an atomic update for installations that already have the Elasticsearch mappings. Add a test that checks that Zebra and Elasticsearch index the same fields, and that the generated Zebra stylesheet is up to date with the index definitions it is generated from. Existing installations need to reindex. With Zebra, copy biblio-zebra-indexdefs.xsl to the Zebra configuration first. To test: 1. Create a record with a 001 (for example T1) 2. Create records that have a 760, 762, 765, 767, 786 or 788 with $w T1 3. Search for rcn:T1 in the staff interface => The records with 760, 762, 765, 767, 786 and 788 are not found 4. Apply the patch With Elasticsearch run $ perl installer/data/mysql/updatedatabase.pl With Zebra copy etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl to your Zebra configuration 5. Reindex 6. Search for rcn:T1 again => All the records are found 7. Run $ prove t/Koha_SearchEngine_rcn.t => SUCCESS: Tests pass! 8. Sign off -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.