[Bug 18098] New: Add an index with the count of available items
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Bug ID: 18098 Summary: Add an index with the count of available items Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17297 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- There should be an index including the amount of items that are available. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 60123 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60123&action=edit Bug 18098: Add an index with the count of available items This patch adds a way to specify which MARC field contains the onloan status and uses it to generate an XSLT that generates a new index for Zebra called 'available'. This index contains the amount of items that have an onloan status different than 1. The idea is to change the way we build the query on the Perl side, and just search for available > 0, taking advantage of DOM indexing capabilities. To test: - Have a marcxml record containing holdings (952/995 depending on your MARC flavour). - Run: $ xsltproc \ etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ your_record.marcxml => FAIL: There's no 'available' z:index. - Apply the patch - Run: $ xsltproc \ etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ your_record.marcxml => SUCCESS: There's a <z:index> entry for 'available' - Sign off :-D Sponsored-by: ByWater Solutions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add an index with the count |Add an index with the count |of available items |of not onloan items Assignee|gmcharlt@gmail.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60123|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 60818 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60818&action=edit Bug 18098: Add an index with the count of not onloan items This patch adds a numeric index 'not-onloan-count' containing the value of 999$x. This subfield is filled by 'rebuild_zebra.pl' by making use of (bug's 18208) 'EmbedItemsAvailability' filter. bib1.att and indexes definitions are updated accordingly. To test: - Apply the patch - Pick the right biblio-zebra-indexdefs.xsl file for your setup and replace the one your Zebra uses [1] - Replace your bib1.att - Replace your ccl.properties - Have at least one record with more than one item, checkout some item(s) from that record(s). - Rebuild zebra's indexes: $ sudo koha-shell kohadev k$ cd kohaclone k$ misc/migration_tools/rebuild_zebra.pl -r -b -v -k (notice the dump directory is kept, you can try the XSLT yourself running: $ xsltproc \ etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ /tmp/the_dump_dir/biblios/exported_records | less => SUCCESS: There are records with the not-onloan-count index, and the value is correct! - Check Zebra yourself: $ yaz-client unix:/var/run/koha/kohadev/bibliosocket Z> base biblios Z> find @attr 1=9013 @attr 2=5 @attr 4=109 0 => SUCCESS: The search matches the amount of records with not-onloan items. Z> s 1+1 => SUCCESS: Records with 999$x having a value higher than 0 are rendered - Sign off :-D Note: While this work is complete on its purpose, it is part of an attempt to create a better way of filtering by availability. Sponsored-by: ByWater Solutions [1] In kohadevbox this would be /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |18208 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18208 [Bug 18208] Add RecordProcessor filter to inject not onloan count to MARC records -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17297 | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60818|0 |1 is obsolete| | --- Comment #4 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 60859 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60859&action=edit [SIGNED-OFF] Bug 18098: Add an index with the count of not onloan items This patch adds a numeric index 'not-onloan-count' containing the value of 999$x. This subfield is filled by 'rebuild_zebra.pl' by making use of (bug's 18208) 'EmbedItemsAvailability' filter. bib1.att and indexes definitions are updated accordingly. To test: - Apply the patch - Pick the right biblio-zebra-indexdefs.xsl file for your setup and replace the one your Zebra uses [1] - Replace your bib1.att - Replace your ccl.properties - Have at least one record with more than one item, checkout some item(s) from that record(s). - Rebuild zebra's indexes: $ sudo koha-shell kohadev k$ cd kohaclone k$ misc/migration_tools/rebuild_zebra.pl -r -b -v -k (notice the dump directory is kept, you can try the XSLT yourself running: $ xsltproc \ etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ /tmp/the_dump_dir/biblios/exported_records | less => SUCCESS: There are records with the not-onloan-count index, and the value is correct! - Check Zebra yourself: $ yaz-client unix:/var/run/koha/kohadev/bibliosocket Z> base biblios Z> find @attr 1=9013 @attr 2=5 @attr 4=109 0 => SUCCESS: The search matches the amount of records with not-onloan items. Z> s 1+1 => SUCCESS: Records with 999$x having a value higher than 0 are rendered - Sign off :-D Note: While this work is complete on its purpose, it is part of an attempt to create a better way of filtering by availability. Sponsored-by: ByWater Solutions [1] In kohadevbox this would be /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Bug 18098 depends on bug 18208, which changed state. Bug 18208 Summary: Add RecordProcessor filter to inject not onloan count to MARC records https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18208 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA: Looking here now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Seems to work fine (MARC21), but we still need biblio-zebra-indexdefs.xsl for unimarc and normarc. Note that 'working fine' in my case included restarting zebra and indexer. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60859|0 |1 is obsolete| | --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63112 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63112&action=edit Bug 18098: Add an index with the count of not onloan items This patch adds a numeric index 'not-onloan-count' containing the value of 999$x. This subfield is filled by 'rebuild_zebra.pl' by making use of (bug's 18208) 'EmbedItemsAvailability' filter. bib1.att and indexes definitions are updated accordingly. To test: - Apply the patch - Pick the right biblio-zebra-indexdefs.xsl file for your setup and replace the one your Zebra uses [1] - Replace your bib1.att - Replace your ccl.properties - Have at least one record with more than one item, checkout some item(s) from that record(s). - Rebuild zebra's indexes: $ sudo koha-shell kohadev k$ cd kohaclone k$ misc/migration_tools/rebuild_zebra.pl -r -b -v -k (notice the dump directory is kept, you can try the XSLT yourself running: $ xsltproc \ etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \ /tmp/the_dump_dir/biblios/exported_records | less => SUCCESS: There are records with the not-onloan-count index, and the value is correct! - Check Zebra yourself: $ yaz-client unix:/var/run/koha/kohadev/bibliosocket Z> base biblios Z> find @attr 1=9013 @attr 2=5 @attr 4=109 0 => SUCCESS: The search matches the amount of records with not-onloan items. Z> s 1+1 => SUCCESS: Records with 999$x having a value higher than 0 are rendered - Sign off :-D Note: While this work is complete on its purpose, it is part of an attempt to create a better way of filtering by availability. Sponsored-by: ByWater Solutions [1] In kohadevbox this would be /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl Edit: Added the missing XSLT changes for UNIMARC and NORMARC Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Tomas! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Resolution|--- |FIXED Status|Pushed to Master |RESOLVED --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This won't get ported back to 16.11.x as it is an enhancement. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19122 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19122 [Bug 19122] IncludeSeeFromInSearches is broken -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36884 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org