[Koha-bugs] [Bug 21286] Advanced search for Corporate-name creates Zebra errors

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 30 03:55:26 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21286

--- Comment #1 from David Cook <dcook at prosentient.com.au> ---
For example:

11:46:06-30/08 zebrasrv(44) [request] Search biblios ERROR 114 1 1+0 RPN
@attrset Bib-1 @and @or @or @attr 1=Corporate-name @attr 4=1 @attr 6=3 @attr
9=32 @attr 2=102 corruption @attr 1=Corporate-name @attr 4=1 @attr 9=26 @attr
2=102 corruption @attr 1=Corporate-name @attr 4=6 @attr 9=20 @attr 2=102
corruption @attr 1=homebranch CPL

If you try that same search in yaz-client, you'll get something like:

Z> f @attrset Bib-1 @and @or @or @attr 1=Corporate-name @attr 4=1 @attr 6=3
@attr 9=32 @attr 2=102 corruption @attr 1=Corporate-name @attr 4=1 @attr 9=26
@attr 2=102 corruption @attr 1=Corporate-name @attr 4=6 @attr 9=20 @attr 2=102
corruption @attr 1=homebranch CPL
Sent searchRequest.
Received SearchResponse.
Search was a bloomin' failure.
Number of hits: 0, setno 1
Result Set Status: none
records returned: 0
Diagnostic message(s) from database:
    [114] Unsupported Use attribute -- v2 addinfo 'Corporate-name'
Elapsed: 0.006073

You can get some insight from this wiki entry:
https://wiki.koha-community.org/wiki/Troubleshooting_Zebra#What_is_an_Unsupported_Use_attribute.3F
(I wrote this years ago and it needs work but it's mostly on point.)

So it's an issue with the index not belonging in a particular register. As per
my earlier comment and based on the search query, it's the "phrase" register
it's missing from.

The interesting thing is that if we remove the @attr 6=3 from the above query,
the query returns successfully. 

That's because the "phrase" register is only used for complete fields (ie for
queries that have a @attr 6=3 attribute). You can see this in Table 5.13 at
https://software.indexdata.com/zebra/doc/querymodel-zebra.html. 

Mind blown.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list