[Bug 35330] New: Split rcn index to allow for more specific searches
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35330 Bug ID: 35330 Summary: Split rcn index to allow for more specific searches Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org Depends on: 26314 At the moment the index on Record control-number (7xx$w, 8xx$w) includes the $w subfields of multiple linking fields. This means that we can't specify a search that only find a specific type of link. Example: * Finding all volumes linked to a set record, will also find records that are also linked as another physical form (776) or a preceding entry (780) It would be nice to have the general, but also more specific indexes limited to the relevant $w only. As features like bug 26314 use the indexes in internal functions to do searches in the background, we cannot easily solve this with local changes to indexing and XSLT. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26314 [Bug 26314] "Volumes: show volumes" showing regardless of whether there are volumes linked to the record -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35330 Bug 35330 depends on bug 26314, which changed state. Bug 26314 Summary: "Volumes: show volumes" showing regardless of whether there are volumes linked to the record https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26314 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35330 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34482 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34482 [Bug 34482] Improve MARC21 7xx linking fields in bibliographic records [Omnibus] -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35330 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |39287, 38252 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38252 [Bug 38252] Zebra's Record-control-number does not include $w for 760, 762, 765, 767, 786, 788 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39287 [Bug 39287] Improve "Show volume" search with a more specialized search index -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35330 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=44064 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35330 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 211522 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211522&action=edit Bug 35330: Add an rcn-components index for the components of a record The Record-control-number (rcn) index holds the $w of every linking field. The components of a record (analytics) were found with it, so a record that links to the host through another field, such as 776 (other physical form) or 780 (preceding entry), was also found when it was a monographic or serial component part. Bug 39287 added the rcn-volumes index for the volumes of a record. Add a similar rcn-components index, that only holds the $w of 773, the field that links a component part to its host item, for Zebra and for Elasticsearch, and use it: * in get_components_query * for the "Analytics" link of the staff interface and OPAC detail pages (which build the same query) * in place of rcn for the series links (800, 810, 811 and 830) of the staff interface and OPAC, which look for the volumes of a series, as bug 39287 did for "Show volumes" Add an atomic update for installations that already have the Elasticsearch mappings, and a test that checks that Zebra and Elasticsearch index the same fields. Existing installations need to reindex. With Zebra, copy bib1.att, ccl.properties and biblio-zebra-indexdefs.xsl to the Zebra configuration first. This depends on bug 39287. To test: 1. Create a record with a 001, for example HOST1 2. Create a record with a monographic component part Leader (07 'a') and 773$w HOST1 3. Create a record with Leader/07 'a' and 776$w HOST1 4. Create a record with Leader/07 'b' and 780$w HOST1 5. Set ShowComponentRecords to both 6. Open the first record, in the staff interface => The Components tab lists the 3 records (before this patch) 7. Apply the patch With Elasticsearch run $ perl installer/data/mysql/updatedatabase.pl With Zebra copy bib1.att, ccl.properties and biblio-zebra-indexdefs.xsl to your Zebra configuration 8. Reindex 9. Open the first record again, in the staff interface and in the OPAC => Only the record with 773$w HOST1 is listed as a component => The Analytics link searches rcn-components:HOST1 10. Run $ prove t/Koha_SearchEngine_rcn_components.t t/db_dependent/Koha/Biblio.t => SUCCESS: Tests pass! 11. Sign off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35330 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk Status|NEW |Needs Signoff --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Hi Katrin, Now that bug 39287 has added a narrower index for the volumes of a record, I have attached a patch that does the same for the components (analytics) of a record. It depends on bug 39287. rcn-components only holds the $w of 773, the field that links a component part to its host item, for Zebra and for Elasticsearch. It is used in get_components_query and in the Analytics link of the staff interface and OPAC detail pages. I also changed the series links (800, 810, 811 and 830) in the staff interface and OPAC to use rcn-volumes, as was done for Show volumes. Nothing in the code uses the general rcn index any more, but it stays available for searching. This removes false components: with the old index, a component part (bib-level a or b) that links to a record through 776 or 780 was also found as a component of it. I checked this on Elasticsearch 8: the old query found 3 records, 2 of them linked through 776 and 780, and the new one finds only the record linked through 773. There is an atomic update for existing Elasticsearch installations and a test that checks that Zebra and Elasticsearch index the same fields. Existing installations need to reindex (and with Zebra copy bib1.att, ccl.properties and biblio-zebra-indexdefs.xsl to their configuration first), so this needs a release note. I am setting this to Needs Signoff. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org