https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15745
--- Comment #4 from David Cook <[email protected]> --- (In reply to M. Tompsett from comment #3) > What about the test case where you want to search for double quotes? > Escaping is needed. Perhaps there is another way? I disagree. Why do you think escaping is needed? Can you point me to the particular test case or query in mind? Firstly, the values are coming from the MARC record, so I doubt there will be many double quotes in that data. Secondly, even if there are double quotes in the data, CCL2RPN takes them into account. We can see what happens if we double up our double quotes on the front/back of the query: Z> find id-other,st-urx="http://libris.kb.se/resource/bib/219553" Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 11, setno 31 SearchResult-1: term=http://libris.kb.se/resource/bib/219553 cnt=11 records returned: 0 Elapsed: 0.000886 BECOMES: @attrset Bib-1 @attr 1=9012 @attr 4=104 http://libris.kb.se/resource/bib/219553 Z> find id-other,st-urx=""http://libris.kb.se/resource/bib/219553"" Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 11, setno 32 SearchResult-1: term=http://libris.kb.se/resource/bib/219553 cnt=11 records returned: 0 Elapsed: 0.000792 BECOMES: @attrset Bib-1 @attr 1=9012 @attr 4=104 http://libris.kb.se/resource/bib/219553 Z> f ti,phr=""This is a test"" Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 4, setno 33 SearchResult-1: term=This cnt=4, term=is cnt=4, term=a cnt=4, term=test cnt=4 records returned: 0 Elapsed: 0.001079 BECOMES: @attrset Bib-1 @attr 1=4 @attr 4=1 "This is a test" Z> f ti,phr="This is a test" Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 4, setno 34 SearchResult-1: term=This cnt=4, term=is cnt=4, term=a cnt=4, term=test cnt=4 records returned: 0 Elapsed: 0.000961 BECOMES: @attrset Bib-1 @attr 1=4 @attr 4=1 "This is a test" -- I'm guessing you're referring to a case where the data contains a double quote and you're searching to match a double quote... but Zebra should strip out double quotes during indexing in most cases. It might not for URLs, but RFC3986 stipulates that you should be percent encoding double quotes as %22 anyway so that shouldn't be an issue. I'll look at an example of that in a moment... -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
