<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hey brains trust,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m reaching out to everyone as I’m a bit stuck with <a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15541">http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15541</a> at the moment.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>There’s currently no way to search an index with the “url” (ie “u”) register.  A URL is stored “as is” in that index, but all our Koha search methods use s/:/=/g or s/=/:/g and that plays havoc with the URLs used in a search query, which makes the match fail against the indexed URL. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>C4::Matcher::get_matches() strips spaces and punctuation, so I’ve added a “none” or “raw” normalizer that performs no normalization, but C4::Search::SimpleSearch() does that global replacement for “:” and “=” (depending on your QueryParser settings and what qualifiers you’ve specified in your Record Matching Rules).<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I thought about adding a “skip normalization” flag to C4::Search::SimpleSearch, but that doesn’t work because C4::Matcher uses : for QueryParser and = for non-QueryParser… except C4::Search::SimpleSearch() deactivates QueryParser mode if you have a “index,phr” set of qualifiers… which means that you get a “:” when you need a “=” for the non-QueryParser CCL query…<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I suppose the solution might be the following:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Current Matcher.pm:<o:p></o:p></p><p class=MsoNormal>$QParser = C4::Context->queryparser if (C4::Context->preference('UseQueryParser'));<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Current Search.pm<o:p></o:p></p><p class=MsoNormal>$QParser = C4::Context->queryparser if (C4::Context->preference('UseQueryParser') && ! ($query =~ m/\w,\w|\w=\w/));<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Future Matcher.pm:<o:p></o:p></p><p class=MsoNormal>$QParser = C4::Context->queryparser if (C4::Context->preference('UseQueryParser') && ! ($query =~ m/\w,\w|\w=\w/));<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>If I just have that conditional the same in both Search.pm and Matcher.pm… then maybe a “skip_normalization” flag in SimpleSearch() would work…<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I might try that in a minute… but opening it up because I could really use a hand with this.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='mso-fareast-language:EN-AU'>David Cook<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-AU'>Systems Librarian<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-AU'>Prosentient Systems<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-AU'>72/330 Wattle St, Ultimo, NSW 2007<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>