Hey all:
I just opened Bug 15198 (http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198) 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. I ramble about it below but everything you actually need to know is in the bug report. 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. Cheers, -David -- 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). Observe: Z> find @attr 14=1 @not @attr 1=4 test @attr 1=9011 1 Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 8, setno 20 SearchResult-1: term=test cnt=8, term=1 cnt=0 records returned: 0 Elapsed: 0.000678 Z> find @not @attr 1=4 test @attr 1=9011 1 Sent searchRequest. Received SearchResponse. Search was a bloomin' failure. Number of hits: 0, setno 21 Result Set Status: none records returned: 0 Diagnostic message(s) from database: [114] Unsupported Use attribute -- v2 addinfo '9011' Elapsed: 0.000650 Here's the info about attribute type 14 from the Zebra docs (http://www.indexdata.com/zebra/doc/querymodel-zebra.html): 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. Cheers to Jesse Weaver for realizing the syntax was @attr 14=1. For those of you who don't read PQF, I'll do it in CCL too: Z> find ignore-empty=(kw=test not Suppress=1) Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 97, setno 2 SearchResult-1: term=test cnt=97, term=1 cnt=0 records returned: 0 Elapsed: 0.000969 Z> find kw=test not Suppress=1 Sent searchRequest. Received SearchResponse. Search was a bloomin' failure. Number of hits: 0, setno 3 Result Set Status: none records returned: 0 Diagnostic message(s) from database: [114] Unsupported Use attribute -- v2 addinfo '9011' Elapsed: 0.000841 *Note that I just added "ignore-empty 14=1" to my ccl.properties to get that ignore-empty=() to work. Actually, the lightest touch for this issue would be to change: Suppress 1=9011 To Suppress 1=9011 14=1 Check that out: Z> find kw=test not Suppress=1 Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 97, setno 1 SearchResult-1: term=test cnt=97, term=1 cnt=0 records returned: 0 Elapsed: 0.005849 David Cook Systems Librarian Prosentient Systems 72/330 Wattle St, Ultimo, NSW 2007
_______________________________________________ Koha-devel mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
