[Bug 6786] New: False detection of index names in Search; make index names case insensitive
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 Bug #: 6786 Summary: False detection of index names in Search; make index names case insensitive Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: ASSIGNED Severity: minor Priority: PATCH-Sent Component: Searching AssignedTo: m.de.rooy@rijksmuseum.nl ReportedBy: m.de.rooy@rijksmuseum.nl QAContact: koha-bugs@lists.koha-community.org An erroneous regex in Search.pm makes that some search expressions are marked ccl= queries while they do not contain an index name. Note that these queries contain a : or = (Users should not enter them if they do not intend to use indexes, but unfortunately they do.) Example: opac-search.pl?q=rembrandt+%3A contains the index name "an" (for authority); this search results in an 500 error. opac-search.pl?q=hals+%3A does not contain an index name and gives results opac-search.pl?q=vermeer+%3A does not contain an index name and gives results A tiny adjustment in the regex and a change in the loop structure makes the code slightly faster and solves the false index detections. While doing that, I included a comparison with lowercase. This makes index names in searches case insensitive. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 --- Comment #1 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-08-25 11:32:43 UTC --- Created attachment 5145 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5145 Patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #2 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-08-25 11:36:11 UTC --- *** Bug 6317 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5145|0 |1 is obsolete| | --- Comment #3 from Frédéric Demians <frederic@tamil.fr> 2011-09-01 12:04:25 UTC --- Created attachment 5251 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5251 Signed-off patch I can confirm the bug and the solution. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com Patch Status|Signed Off |Passed QA --- Comment #4 from Paul Poulain <paul.poulain@biblibre.com> 2011-10-06 14:27:39 UTC --- QA comment * perfect test case * small patch, nothing to say from a QA POV marking passed QA ! -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Patch Status|Passed QA |Patch Pushed --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> 2011-10-07 01:10:53 UTC --- Pushed, please test -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Severity|minor |critical --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2011-12-04 08:56:23 UTC --- Hi, this breaks searches for Control-number as used to link back from analytics to serials using $w in MARC21. To test: - Add a record and fill in 001 - Try to search for Control-number:<001> in a keyword search This needs to be reverted until a better fix can be found that does not break existing features. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 --- Comment #7 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-12-04 16:08:01 UTC --- (In reply to comment #6)
this breaks searches for Control-number as used to link back from analytics to serials using $w in MARC21.
This needs to be reverted until a better fix can be found that does not break existing features.
Good catch, Katrin. I think we should not revert it; only a small change in the regex in buildQuery is needed. Problem here seems to be the hyphen in Control-number. I tested this one: /(?:^|\W)([\w-]+)(,[\w-]+)*[:=]/g And it seems to work. I hope to send a follow up patch for this tomorrow. If you are faster, that is fine too. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5251|0 |1 is obsolete| | --- Comment #8 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-12-05 07:47:49 UTC --- Created attachment 6572 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6572 Follow up fix for hyphens in index names -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Patch Pushed |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6572|0 |1 is obsolete| | --- Comment #9 from Chris Cormack <chris@bigballofwax.co.nz> 2011-12-05 07:54:05 UTC --- Created attachment 6573 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6573 Bug 6786: Follow up fixing index names with hyphens Adds hyphen to regex looking for index names in buildQuery. Test by searching on Control-number=... Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 --- Comment #10 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-12-05 07:56:23 UTC --- QA Request for Paul or Ian: Could you please set this to Passed QA and push it. Resolves searching on index names with hyphen. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QAContact|koha-bugs@lists.koha-commun |ian.walls@bywatersolutions. |ity.org |com -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 --- Comment #11 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-12-05 08:09:50 UTC --- Can and should be applied to 3.6.X too. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Passed QA --- Comment #12 from Ian Walls <ian.walls@bywatersolutions.com> 2011-12-05 14:52:59 UTC --- Adds hyphen back into regex, which is required for many/most of the search indexes in bib1.att. Please note that / is also used in several of the bib1.att indexes... now as to whether we actually support those particular indexes, I'm not sure, but theoretically, we should probably also include regex matching for / as well. Passed QA -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |rel_3_6 Patch Status|Passed QA |Patch Pushed --- Comment #13 from Paul Poulain <paul.poulain@biblibre.com> 2011-12-06 10:50:14 UTC --- follow-up patch pushed, please test Chris: the patch was pushed on new/bug_6786 branch, but it should have been a follow-up. Where did you pushed the initial fix ? did I missed something ? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6786 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2011-12-18 20:43:14 UTC --- I see both patches in master and 3.6.x now. Search for "Control-number" works in master. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org