[Bug 24517] New: Zebra: date-entered-on-file misses 6th position
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24517 Bug ID: 24517 Summary: Zebra: date-entered-on-file misses 6th position Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org Date entered on file is in MARC21 tag 008 position 00 to 05 (or 1-6 for normal humans). In Koha only the first 5 digits are indexed with Zebra. Does not really facilitate searching ;) <index_control_field tag="008" offset="0" length="5"> <target_index>date-entered-on-file:n</target_index> </index_control_field> <index_control_field tag="008" offset="0" length="5"> <target_index>date-entered-on-file:s</target_index> </index_control_field> <xslo:template match="marc:controlfield[@tag='008']"> <z:index name="date-entered-on-file:n"> <xslo:value-of select="substring(., 1, 5)"/> </z:index> <z:index name="date-entered-on-file:s"> <xslo:value-of select="substring(., 1, 5)"/> </z:index> Elasticsearch appears to do a better job: date-entered-on-file: label: date-entered-on-file mappings: - facet: '' marc_field: '008_/0-5' marc_type: marc21 sort: ~ suggestible: '' - facet: '' marc_field: '008_/0-5' marc_type: normarc sort: ~ suggestible: '' -- 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=24517 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Just bumped into this one. Fun times 🤣 -- 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=24517 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Couldn't recall if we just update the XML or also the XSLT, so I'll do two separate patches. This is how I generated the XSLT though: xsltproc ./etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml > ./etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl -- 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=24517 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This patch fixes the release notes| |date-entered-on-file index | |so that it correctly uses | |all 6 characters instead of | |the 5 character it has used | |the last 11 years. -- 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=24517 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Test plan: Before applying patch... 1. yaz-client unix:/var/run/koha/kohadev/bibliosocket 2. base biblios 3. querytype ccl2rpn 4. set_cclfile /etc/koha/zebradb/ccl.properties 5. find date-entered-on-file,st-numeric < 23000 6. format xml 7. elements zebra::snippet 8. show 1 9. Note that only 5 digits appear in the "date-entered-on-file" snippet (e.g. 12082) -- Apply the patch 0a. cp etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl 0b. koha-rebuild-zebra -b -f -v kohadev 1. yaz-client unix:/var/run/koha/kohadev/bibliosocket 2. base biblios 3. querytype ccl2rpn 4. set_cclfile /etc/koha/zebradb/ccl.properties 5. find date-entered-on-file,st-numeric < 230000 6. format xml 7. elements zebra::snippet 8. show 1 9. Note that 6 digits appear in the "date-entered-on-file" snippet (e.g. 120829) -- 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=24517 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=24517 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- Created attachment 152071 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152071&action=edit Bug 24517: Add missing 6th position to date-entered-on-file index -- 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=24517 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- Created attachment 152072 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152072&action=edit Bug 24517: Add missing 6th position to date-entered-on-file index (XSLT) -- 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=24517 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | -- 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=24517 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This patch fixes the |This patch fixes the release notes|date-entered-on-file index |date-entered-on-file index |so that it correctly uses |so that it correctly uses |all 6 characters instead of |all 6 characters instead of |the 5 character it has used |the 5 character it has used |the last 11 years. |the last 11 years. | | | |Note: | |For this patch to have | |effect, Zebra must be | |re-indexed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24517 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=24517 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152071|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 152223 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152223&action=edit Bug 24517: Add missing 6th position to date-entered-on-file index Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24517 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152072|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 152224 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152224&action=edit Bug 24517: Add missing 6th position to date-entered-on-file index (XSLT) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24517 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- - <index_control_field tag="008" offset="0" length="5"> + <index_control_field tag="008" offset="0" length="6"> - <xslo:value-of select="substring(., 1, 5)"/> + <xslo:value-of select="substring(., 1, 6)"/> This is ok. Just confusing that XSLT substring starts with 1 while we use offset with zero.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24517 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=24517 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24517 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152223|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 152621 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152621&action=edit Bug 24517: Add missing 6th position to date-entered-on-file index Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Adding the biblio-zebra-indexdefs.xsl on same patch (as should be generated with xsltproc). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24517 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=24517 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152224|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24517 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24517 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24517 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.11.00 |23.11.00,23.05.02 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24517 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for all the hard work! Pushed to 23.05.x for the next release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24517 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00,23.05.02 |23.11.00,23.05.02,22.11.08 released in| | Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24517 --- Comment #12 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Nice work everyone! Pushed to 22.11.x for next release -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org