[Bug 5369] New: se queries with paranthesis fail
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5369 Summary: se queries with paranthesis fail Change sponsored?: --- Product: Koha Version: rel_3_2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: Searching AssignedTo: gmcharlt@gmail.com ReportedBy: barrett@library.med.nyu.edu QAContact: koha-bugs@lists.koha-community.org Estimated Hours: 0.0 opac-search.pl?q=se:DHEW%20publication%20no.%20%28HSM%29%2073-1804 displays a screen error: Can't call method "sort" on an undefined value at /usr/share/koha/lib/C4/Search.pm line 394. And logs: [Fri Nov 05 13:47:34 2010] [error] [client 10.161.4.254] [Fri Nov 5 13:47:34 2010] opac-search.pl: WARNING: query problem with (se=DHEW publication no. (HSM) 73-1804) not Suppress=1 ZOOM error 10014 "CCL parsing error" (addinfo: "')' expected") from diag-set 'ZOOM' at /usr/share/koha/lib/C4/Search.pm line 346., referer: <...>/koha/opac-detail.pl?biblionumber=93114 Removing the html encoded parenthesis characters %28 and %29 from the query returned the expected results. The query is a link generated by opac-detail.pl -- 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=5369 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jcamins@cpbibliography.com --- Comment #1 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-01-31 20:38:18 UTC --- This seems to be the result of having the syspref QueryAutoTruncate set to "automatically." Disabling QueryAutoTruncate makes these searches work. -- 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=5369 D Ruth Bavousett <ruth@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ruth@bywatersolutions.com --- Comment #2 from D Ruth Bavousett <ruth@bywatersolutions.com> 2011-03-29 13:50:58 UTC --- Not for me it doesn't, Jared. The site I am wrestling with is using XSLT. If you edit the search string generated by the XSLT to exclude [();], then it works, with or without QueryAutoTruncate turned on, so that may be the best way to go, at least for XSLT-based sites. -- 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=5369 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|gmcharlt@gmail.com |jcamins@cpbibliography.com --- Comment #3 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-03-29 13:56:01 UTC --- It's possible to escape parentheses. I'll get a patch for this written. -- 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=5369 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com Version|rel_3_2 |master -- 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=5369 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-08-18 13:13:58 UTC --- Looking at this problem, I suspect that the problem is not in the parentheses but in the use of an index (like se) together with a number of search operands between spaces. Search.pm interprets this as a ccl query. But ZOOM does not like this query since it expects operators between the operands. In other words, it does not like query [Field1=Value1 Value2]; it does like: [Field1=Value1 or Value2] or even better: [Field1=Value1 or Field2=Value2]. (Brackets for visibility only!) In case you would really want to do a phrase search, you need to tell Koha something like [se,phr: "Value1 Value2"] Note that such a phrase search with parentheses could even work: se,phr: "(Low countries)" worked for me; se,phr: "Low (countries)" worked as well. But I wonder if a regular user would ever come up with such searches.. This problem should be solved by refactoring Search.pm; especially routine buildQuery is here the problem. The Advanced Search could offer some more assistance in making the difference between word and phrase search. -- 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=5369 --- Comment #5 from lculber@mdah.state.ms.us 2011-08-18 13:51:21 UTC --- In our catalog, the problem is in clicking on a link from /cgi-bin/koha/opac-detail.pl such as Vicksburg (Miss.) -- Directories. which in the MARC record would be a 651 $aVicksburg (Miss)$vDirectories. A search for “kw,wrdl: vicksburg miss. directories" does work but the parenthesis when clicking on the link from the opac-detail doesn't. -- 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=5369 --- Comment #6 from lculber@mdah.state.ms.us 2011-10-20 12:41:23 UTC --- the fix of enclosing in quotes for bug 6553 may also work for this. 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=5369 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2011-11-28 20:00:21 UTC --- Created attachment 6448 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6448 Bug 5369: se queries with paranthesis fail This patch does several things to make the search work better: 1) Adding "" around search terms for queries on index se. 2) Make links for 8xx obey the UseControlNumber system preference 3) Fix the indexing for 8xx fields, as they were not included in the se index before Note: Make sure you copy the new record.abs into your koha-dev directory and reindex before testing. To test: 1) Add records using the following fields: 440$a 490$a ind. 1 = empty or 0 490$a ind. 1 = 1 800$a, 810$a, 811$a or 830$a Example value taken form bug description, should only work after applying the patch: DHEW publication no. (HSM) 73-1804 Please also test with other examples. -- 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=5369 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |PATCH-Sent CC| |katrin.fischer@bsz-bw.de Patch Status|--- |Needs Signoff AssignedTo|jcamins@cpbibliography.com |katrin.fischer@bsz-bw.de -- 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=5369 Marijana <mglavica@ffzg.hr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mglavica@ffzg.hr -- 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=5369 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6448|0 |1 is obsolete| | --- Comment #8 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-12-02 00:28:12 UTC --- Created attachment 6499 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6499 Bug 5369: se queries with paranthesis fail This patch does several things to make the search work better: 1) Adding "" around search terms for queries on index se. 2) Make links for 8xx obey the UseControlNumber system preference 3) Fix the indexing for 8xx fields, as they were not included in the se index before Note: Make sure you copy the new record.abs into your koha-dev directory and reindex before testing. To test: 1) Add records using the following fields: 440$a 490$a ind. 1 = empty or 0 490$a ind. 1 = 1 800$a, 810$a, 811$a or 830$a Example value taken form bug description, should only work after applying the patch: DHEW publication no. (HSM) 73-1804 Please also test with other examples. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.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=5369 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #9 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-12-02 00:32:07 UTC --- Nice work, Katrin! A follow-up patch from me converting the series tracings to se,phr: is forthcoming. -- 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=5369 --- Comment #10 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-12-02 00:41:16 UTC --- Created attachment 6501 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6501 Bug 5369: Make series tracings use phrase indexes By definition, series tracings should search for other records in the same series, i.e., those with the exact same series title. This patch forces the tracings to use phrase indexes for series tracings. Note that this patch DOES NOT respect TraceCompleteSubfields. While that may be desirable, it is outside the scope of the current patch. An additional follow-up patch could be written to add support for TraceCompleteSubfields, if community concensus is that series tracings should obey TraceCompleteSubfields. -- 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=5369 --- Comment #11 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-12-02 00:42:02 UTC --- The second patch still requires sign-off. The first patch has been signed off. Please note that the second patch depends on the first 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. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5369 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6501|0 |1 is obsolete| | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2011-12-02 06:33:15 UTC --- Created attachment 6507 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6507 [SIGNED-OFF] Bug 5369: Make series tracings use phrase indexes By definition, series tracings should search for other records in the same series, i.e., those with the exact same series title. This patch forces the tracings to use phrase indexes for series tracings. Note that this patch DOES NOT respect TraceCompleteSubfields. While that may be desirable, it is outside the scope of the current patch. An additional follow-up patch could be written to add support for TraceCompleteSubfields, if community concensus is that series tracings should obey TraceCompleteSubfields. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Thx for the follow up and sign off Jared :) -- 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=5369 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=5369 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QAContact|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | --- Comment #13 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2012-01-04 13:09:23 UTC --- Just a few questions on the first patch before looking further: 1) Should Title-series be only in 800$t, 810$t and 811$t? It is added to $a now too.. 2) From LOC: 840 - SERIES ADDED ENTRY--TITLE (R) [OBSOLETE] Should we rather delete it? -- 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=5369 --- Comment #14 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2012-01-04 13:22:48 UTC --- (In reply to comment #13)
Just a few questions on the first patch before looking further:
1) Should Title-series be only in 800$t, 810$t and 811$t? It is added to $a now too..
That's by design. Title-series is the index used for all series searching, so if someone is interested in a series that's stored in an 800, 810, or 811, they can't search for it using the series index without that change.
2) From LOC: 840 - SERIES ADDED ENTRY--TITLE (R) [OBSOLETE] Should we rather delete it?
No, libraries still use obsolete fields all the time. I actually was just looking at a library that uses 840 for analytics that are part of a series. -- 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=5369 --- Comment #15 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2012-01-04 14:41:40 UTC --- (In reply to comment #14)
That's by design. Title-series is the index used for all series searching, so if someone is interested in a series that's stored in an 800, 810, or 811, they can't search for it using the series index without that change. Design? Could you please comment on the distinction between $a and $t.
-- 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=5369 --- Comment #16 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2012-01-04 15:21:30 UTC --- (In reply to comment #15)
(In reply to comment #14)
That's by design. Title-series is the index used for all series searching, so if someone is interested in a series that's stored in an 800, 810, or 811, they can't search for it using the series index without that change. Design? Could you please comment on the distinction between $a and $t.
That was poorly worded, sorry. The *patch* does that by design, because Koha incorrectly handles series indexing. 8xx$a is not a "title," per se, but Koha only accepts "Title-series" when searching for series. This would be a prime example of why I recommend a strong aperitif before looking at indexing in Koha. I would argue that the results of the change are correct, since Koha misapprehends the semantics of these indexes anyway. -- 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=5369 --- Comment #17 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2012-01-04 15:49:49 UTC --- (In reply to comment #16)
That was poorly worded, sorry. The *patch* does that by design, because Koha incorrectly handles series indexing. 8xx$a is not a "title," per se, but Koha only accepts "Title-series" when searching for series. This would be a prime example of why I recommend a strong aperitif before looking at indexing in Koha. I would argue that the results of the change are correct, since Koha misapprehends the semantics of these indexes anyway.
You are right about that. Quality here is a relative thing ;) -- 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=5369 --- Comment #18 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2012-01-04 15:53:17 UTC --- Another QA Comment however (sorry..) I notice that in the xslt the resulting url contains only one double quote at the beginning (meaning the character "). Example: http://libdevelop.rijksmuseum.nl:8009/cgi-bin/koha/catalogue/search.pl?q=se,... The last %22 is what I mean. There should be a closing one too? Could you resolve that? Thanks. -- 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=5369 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2012-01-05 07:39:13 UTC --- Created attachment 7048 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7048 Bug 5369: Follow up fixing quotes -- 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=5369 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7048|0 |1 is obsolete| | --- Comment #20 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2012-01-05 08:38:57 UTC --- Created attachment 7049 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7049 Signed follow up for quotes -- 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=5369 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Passed QA --- Comment #21 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2012-01-05 08:40:38 UTC --- QA Comment: See also above. Code further looks good. Issue with quotes has been resolved. Marking all three patches as 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=5369 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com Version|master |rel_3_6 Patch Status|Passed QA |Patch Pushed --- Comment #22 from Paul Poulain <paul.poulain@biblibre.com> 2012-01-06 13:11:42 UTC --- patch pushed, please test QA comment: checked UNIMARC record.abs, the problem does not exist -- 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=5369 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable -- 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=5369 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org