[Bug 8620] New: Barcode searching not working correctly
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Priority: P5 - low Change sponsored?: --- Bug ID: 8620 CC: jcamins@cpbibliography.com Assignee: gmcharlt@gmail.com Summary: Barcode searching not working correctly Severity: major Classification: Unclassified OS: All Reporter: katrin.fischer@bsz-bw.de Hardware: All Status: NEW Version: master Component: Searching Product: Koha Searching for a barcode with the barcode only as a keyword doesn't find the record. When adding the prefix bc: before the barcode, the barcode is found. DOM indexing is activated in my installation. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Jorge de Cardenas <jdeca@smfpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jdeca@smfpl.org --- Comment #1 from Jorge de Cardenas <jdeca@smfpl.org> --- (In reply to comment #0)
Searching for a barcode with the barcode only as a keyword doesn't find the record. When adding the prefix bc: before the barcode, the barcode is found.
DOM indexing is activated in my installation.
Katrin, I am just confirming that your situation is the same as ours. On the staff 'Home' page, 'Search Catalog' input field. If just a barcode is entered, we get: No results match your search for 'kw,wrdl: 33529004102850'. I can successfully search for a barcode by entering bc:33529004102850 in the 'Search Catalog' or by going to the 'Advance Search' selecting Barcode from the dropdown keyword selection and entering the barcode in the search field. Jorge -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- We're also having this issue in a few places. It appears to be direclty related to DOM indexing. Martin -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 --- Comment #3 from Jorge de Cardenas <jdeca@smfpl.org> --- This is not a good fix but I replaced: if(not $index){ $index = 'kw'; } in Search.pm (around line 1182) with: if(not $index){ if($operand =~ m/[0-9]{14}/){ $index = 'bc'; }else{ $index = 'kw'; } } Our barcodes are 14 digits long, it tests for 14 digits and sets the index to 'bc' instead of 'kw' when no index was submitted. There is probably a way to fix this through the zebra configuration files but I don't understand them well enough to try it. Jorge -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 chad@pennmanor.net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chad@pennmanor.net -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Ian Bays <ian.bays@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ian.bays@ptfs-europe.com --- Comment #4 from Ian Bays <ian.bays@ptfs-europe.com> --- It seems the line "all any" in record.abs is not carried through to the dom xml and xsl files used. Another workaround to add barcode back in to the general search is to add the "any" index for the barcode in record.abs, re-generate the xml and xsl then rebuild the zebra indexes. So the line in record.abs: melm 952$p barcode,barcode:n becomes: melm 952$p barcode,barcode:n,any:w Then follow the wiki to remake xml and xsl (don't just copy/paste as the example is unimarc): http://wiki.koha-community.org/wiki/Switching_to_dom_indexing It still does not explain how other main fields are retrieved with "any" but have no explicit "any" index in record.abs, but at least it is not changing the code only to be changed back when fixed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|gmcharlt@gmail.com |martin.renvoize@ptfs-europe | |.com --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 15164 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15164&action=edit Patch for barcode missing in keyword search. This patch was worked through with Ian Bays using his suggestion of adding barcode to the any index for searching. To test 1. A pre patch search from the standard search box (either staff client or opac) for a barcode will not yield results. 2.A post patch search from the standard search box (either staff client or opac) for a barcode should yield the single record as a result. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15164|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 15293 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15293&action=edit Patch for barcode missing in keyword search. This patch was worked through with Ian Bays using his suggestion of adding barcode to the any index for searching. To test 1. A pre patch search from the standard search box (either staff client or opac) for a barcode will not yield results. 2.A post patch search from the standard search box (either staff client or opac) for a barcode should yield the single record as a result. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- The new patch re-adds a line that got missed and caused issues in the original patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- As an aside.. the patch I've created only patches the relevant files for MARC21.. though I imagine it's very simple to also patch the ones for UNIMARC. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 --- Comment #9 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 15862 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15862&action=edit Bug 8620: Any index overfull in DOM configurations The Any index seems like it may have been having too many elements added to it. I don't understand how that is possible, but there you go. This patch tests the theory, by changing the way the Any index is populated. To test: 1) Apply patch. 2) Update the following two files: etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl 3) Reindex 4) Do a search that was previously failing. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15293|0 |1 is obsolete| | Attachment #15862|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 15863 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15863&action=edit [SIGNED OFF] Bug 8620: Any index overfull in DOM configurations The Any index seems like it may have been having too many elements added to it. I don't understand how that is possible, but there you go. This patch tests the theory, by changing the way the Any index is populated. To test: 1) Apply patch. 2) Update the following two files: etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl 3) Reindex 4) Do a search that was previously failing. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Fixes the problem for me - formerly not working callnumbers and barcodes are now found in keyword (any) searches. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Martin or Ian, maybe you can test this patch on one of your installations too? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'll also test this one tomorrow... would be nice to get the any index all working properly! Martin -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #13 from Galen Charlton <gmcharlt@gmail.com> --- In my testing, the bug appeared if the -x option to rebuild_zebra.pl was omitted -- i.e., searching by barcode-as-keyword didn't work then. If one of the affected records was reindexed with the -x option, it worked. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15863|0 |1 is obsolete| | --- Comment #14 from Galen Charlton <gmcharlt@gmail.com> --- Created attachment 15869 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15869&action=edit Bug 8620: Any index in DOM mode sensitive to -x flag of rebuild_zebra.pl The definition of the Any index was sensitive to whether spaces were present between (say) subfield elements in the MARCXML representation of the bib being indexed. When using the -x option to rebuild_zebra.pl, spaces would be present because of how MARC::File::XML emits MARCXML. When not using the -x option, spaces would not be present and the contents of a field would be run together, potentially as one big token. The visible behavior was that doing a keyword search by item barcode would sometimes not work. To test: 0) Make sure Zebra is using DOM mode 1) Create an item record. 2) Reindex using rebuild_zebra.pl -b -z, *without* -x 3) Do a keyword search by the barcode of the item just added; the search shouldn't work 4) Apply patch. 5) Update the following two files: etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl 6) Reindex 7) Do a search that was previously failing. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Fixes the problem for me - formerly not working callnumbers and barcodes are now found in keyword (any) searches. Signed-off-by: Galen Charlton <gmc@esilibrary.com> (revised commit description to better explain why it fixes the problem) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am inclined to pass this QA as we have another sign-off from Galen - RM? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15869|0 |1 is obsolete| | --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 15905 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15905&action=edit Bug 8620: Any index in DOM mode sensitive to -x flag of rebuild_zebra.pl Works as expected; Will be glad to see this get pushed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact| |katrin.fischer@bsz-bw.de --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Switching this to Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |critical -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #18 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #19 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.10.x and 3.8.x will be in 3.10.4 and 3.8.11 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathieu.saby@univ-rennes2.f | |r -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8620 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=10137 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org