[Koha-devel] Working around annoying OpacSuppression 114 error in Zebra using special attribute 14

David Cook dcook at prosentient.com.au
Tue Nov 17 04:51:33 CET 2015


Hi Mirko:

 

I had the same question, but I forgot to test it.

 

Unfortunately, I just tried and I got the following error:

 

[25] Specified element set name not valid for specified database -- v2
addinfo ''

 

That's very different from the OpacSuppression search error: [114]
Unsupported Use attribute -- v2 addinfo '9011'

 

Personally, I'm thinking that the empty facet thing is a bug in Zebra. I
think it should return something like the following:

 

<record xmlns="http://www.indexdata.com/zebra/">

  <facet type="0" index="title" />

</record>

 

I've already been sending Adam Dickmeiss a million emails about Zebra, so
perhaps someone should send one regarding that issue.

 

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.

 

David Cook

Systems Librarian

Prosentient Systems

72/330 Wattle St, Ultimo, NSW 2007

 

From: koha-devel-bounces at lists.koha-community.org
[mailto:koha-devel-bounces at lists.koha-community.org] On Behalf Of Mirko
Tietgen
Sent: Tuesday, 17 November 2015 12:56 PM
To: Koha-devel <koha-devel at lists.koha-community.org>
Subject: Re: [Koha-devel] Working around annoying OpacSuppression 114 error
in Zebra using special attribute 14

 

Hi David,

Nice! Would that also work for our problem with empty facets by any chance?

Cheers,

Mirko


David Cook schrieb:

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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20151117/83ff6eb0/attachment-0001.html>


More information about the Koha-devel mailing list