<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;}
@font-face
        {font-family:"\;color\:black\;";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:windowtext;
        text-decoration:underline;}
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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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 bgcolor=white lang=EN-AU link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><a name="_MailEndCompose"><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'>Hi Mirko:<o:p></o:p></span></a></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'>I had the same question, but I forgot to test it.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'>Unfortunately, I just tried and I got the following error:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'> [25] Specified element set name not valid for specified database -- v2 addinfo ''<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'>That’s very different from the OpacSuppression search error: [114] Unsupported Use attribute -- v2 addinfo '9011'<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'>Personally, I’m thinking that the empty facet thing is a bug in Zebra… I think it should return something like the following:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'><record xmlns="http://www.indexdata.com/zebra/"><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'>  <facet type="0" index="title" /><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'></record><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'>I’ve already been sending Adam Dickmeiss a million emails about Zebra, so perhaps someone should send one regarding that issue.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US;text-decoration:none'>I’ve found him very responsive, so he might be willing to fix that as well… or create an option to allow that sort of response.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US'><o:p><span style='text-decoration:none'> </span></o:p></span></p><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;text-decoration:none'>David Cook<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;text-decoration:none'>Systems Librarian<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;text-decoration:none'>Prosentient Systems<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;text-decoration:none'>72/330 Wattle St, Ultimo, NSW 2007<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US'><o:p><span style='text-decoration:none'> </span></o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;text-decoration:none'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;text-decoration:none'> koha-devel-bounces@lists.koha-community.org [mailto:koha-devel-bounces@lists.koha-community.org] <b>On Behalf Of </b>Mirko Tietgen<br><b>Sent:</b> Tuesday, 17 November 2015 12:56 PM<br><b>To:</b> Koha-devel <koha-devel@lists.koha-community.org><br><b>Subject:</b> Re: [Koha-devel] Working around annoying OpacSuppression 114 error in Zebra using special attribute 14<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p><span style='text-decoration:none'> </span></o:p></p><div><p class=MsoNormal>Hi David,<br><br>Nice! Would that also work for our problem with empty facets by any chance?<br><br>Cheers,<br><br>Mirko<br><br><br>David Cook schrieb:<span style='font-size:12.0pt'><o:p></o:p></span></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>Hey all:<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>I just opened Bug 15198 (<a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198">http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198</a>) which contains some instructions for how to make it so that you can turn on OpacSuppression and still retrieve search results, even if you don’t have any suppressed records (942$n = 1) in Zebra.<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>I ramble about it below but everything you actually need to know is in the bug report.<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>I would supply a patch myself, but I’m having issues building Perl dependencies for Master, so I won’t be contributing any patches until I get that sorted…<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>Cheers,<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>-David<o:p></o:p></p><p> <o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>--<o:p></o:p></p><p> <o:p></o:p></p><p> <o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>So I was reading the Zebra docs again (as you do), and I noticed a special attribute type of 14 which could help out with our OpacSuppression issue (whereby you get 0 results – well actually a 114 error – if you don’t have any records suppressed but are sending queries checking for suppression).<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>Observe:<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Z> find @attr 14=1 @not @attr 1=4 test @attr 1=9011 1</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Sent searchRequest.</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Received SearchResponse.</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Search was a success.</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Number of hits: 8, setno 20</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>SearchResult-1: term=test cnt=8, term=1 cnt=0</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>records returned: 0</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Elapsed: 0.000678</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Z> find @not @attr 1=4 test @attr 1=9011 1</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Sent searchRequest.</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Received SearchResponse.</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Search was a bloomin' failure.</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Number of hits: 0, setno 21</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Result Set Status: none</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>records returned: 0</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Diagnostic message(s) from database:</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>    [114] Unsupported Use attribute -- v2 addinfo '9011'</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:";color:black;",serif'>Elapsed: 0.000650</span><o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>Here’s the info about attribute type 14 from the Zebra docs (<a href="http://www.indexdata.com/zebra/doc/querymodel-zebra.html">http://www.indexdata.com/zebra/doc/querymodel-zebra.html</a>):<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>Specifies whether un-indexed fields should be ignored. A zero value (default) throws a diagnostic when an un-indexed field is specified. A non-zero value makes it return 0 hits.<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>Cheers to Jesse Weaver for realizing the syntax was @attr 14=1.<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>For those of you who don’t read PQF, I’ll do it in CCL too:<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>Z> find ignore-empty=(kw=test not Suppress=1)<o:p></o:p></p><p class=MsoNormal>Sent searchRequest.<o:p></o:p></p><p class=MsoNormal>Received SearchResponse.<o:p></o:p></p><p class=MsoNormal>Search was a success.<o:p></o:p></p><p class=MsoNormal>Number of hits: 97, setno 2<o:p></o:p></p><p class=MsoNormal>SearchResult-1: term=test cnt=97, term=1 cnt=0<o:p></o:p></p><p class=MsoNormal>records returned: 0<o:p></o:p></p><p class=MsoNormal>Elapsed: 0.000969<o:p></o:p></p><p class=MsoNormal>Z> find kw=test not Suppress=1<o:p></o:p></p><p class=MsoNormal>Sent searchRequest.<o:p></o:p></p><p class=MsoNormal>Received SearchResponse.<o:p></o:p></p><p class=MsoNormal>Search was a bloomin' failure.<o:p></o:p></p><p class=MsoNormal>Number of hits: 0, setno 3<o:p></o:p></p><p class=MsoNormal>Result Set Status: none<o:p></o:p></p><p class=MsoNormal>records returned: 0<o:p></o:p></p><p class=MsoNormal>Diagnostic message(s) from database:<o:p></o:p></p><p class=MsoNormal>    [114] Unsupported Use attribute -- v2 addinfo '9011'<o:p></o:p></p><p class=MsoNormal>Elapsed: 0.000841<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>*Note that I just added “ignore-empty 14=1” to my ccl.properties to get that ignore-empty=() to work.<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>Actually, the lightest touch for this issue would be to change:<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>Suppress 1=9011<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>To<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>Suppress 1=9011 14=1<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>Check that out:<o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>Z> find kw=test not Suppress=1<o:p></o:p></p><p class=MsoNormal>Sent searchRequest.<o:p></o:p></p><p class=MsoNormal>Received SearchResponse.<o:p></o:p></p><p class=MsoNormal>Search was a success.<o:p></o:p></p><p class=MsoNormal>Number of hits: 97, setno 1<o:p></o:p></p><p class=MsoNormal>SearchResult-1: term=test cnt=97, term=1 cnt=0<o:p></o:p></p><p class=MsoNormal>records returned: 0<o:p></o:p></p><p class=MsoNormal>Elapsed: 0.005849<o:p></o:p></p><p> <o:p></o:p></p><p> <o:p></o:p></p><p> <o:p></o:p></p><p class=MsoNormal>David Cook<o:p></o:p></p><p class=MsoNormal>Systems Librarian<o:p></o:p></p><p class=MsoNormal>Prosentient Systems<o:p></o:p></p><p class=MsoNormal>72/330 Wattle St, Ultimo, NSW 2007<o:p></o:p></p><p> <o:p></o:p></p></div></blockquote></div></div></body></html>