Bug 12366 - Better handling of Zebra errors when searching empty indexes
Summary: Better handling of Zebra errors when searching empty indexes
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Z39.50 / SRU / OpenSearch Servers (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-05 06:54 UTC by David Cook
Modified: 2020-11-30 21:45 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2014-06-05 06:54:46 UTC
Currently, if you turn on "OpacSuppression" (i.e. Hide) or "dontmerge" (i.e. Do), Zebra will return errors, if the OpacSuppression index is empty or if the Koha-Auth-Number index is empty. 

You'll encounter the "dontmerge" problem if you try to merge together two authorities when there are no biblio records in the database that have already been linked to an authority. I suppose this could be an edge case, but getting a software error on the screen saying "ZOOM error 114 Unsupported Use attribute" (addinfo: Koha-Auth-Number") from diag-set 'Bib-1" isn't really that helpful. We should either add a warning on the system preference "dontmerge" (that says that you must have one biblio already attached to an authority if you don't want errors when set to "Do") or handle the error from Zebra more gracefully.

Admittedly, handling the error generated by OpacSuppression is probably harder. At the moment, I think it'll say that there are no results (as Zebra will error out). I suppose that might be the best we can do...but it's still sub-optimal.

Another idea is to populate OpacSuppression with a dummy record, although that's also sub-optimal.

I suppose this might just be one of the downsides of using Zebra...

But a warning is probably a good idea in any case for "dontmerge", although I suspect that most people probably use the "Don't" setting, or already have at least one biblio linked to an authority...
Comment 1 David Cook 2016-01-11 00:42:30 UTC
It might be worthwhile to re-look at "dontmerge" in light of http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15198
Comment 2 Katrin Fischer 2020-01-05 14:26:52 UTC
(In reply to David Cook from comment #0)
> Currently, if you turn on "OpacSuppression" (i.e. Hide) or "dontmerge" (i.e.
> Do), Zebra will return errors, if the OpacSuppression index is empty or if
> the Koha-Auth-Number index is empty. 

This has been fixed a onger while ago - turning on OpacSuppression with no suppressed records is no longer breaking search (thankfully).
Comment 3 David Cook 2020-01-06 05:10:05 UTC
(In reply to Katrin Fischer from comment #2)
> (In reply to David Cook from comment #0)
> > Currently, if you turn on "OpacSuppression" (i.e. Hide) or "dontmerge" (i.e.
> > Do), Zebra will return errors, if the OpacSuppression index is empty or if
> > the Koha-Auth-Number index is empty. 
> 
> This has been fixed a onger while ago - turning on OpacSuppression with no
> suppressed records is no longer breaking search (thankfully).

Hehe I'm the one who fixed it. 

But I think this bug report is still valid as there are other searches that can contain syntax errors which cause Zebra to fail, but Koha to just report that 0 records matched.

My goal with this bug report is for us to highlight that there was a problem with the search query. Otherwise, people might get the mistaken impression that there really are no relevant records in the database, when really the only problem is their syntax :(.
Comment 4 Katrin Fischer 2020-01-06 09:46:26 UTC
I am sorry, but I don't feel we should keep it open without having something broken we can name and fix - it will just remain open forever. If we want to document Zebra's behaviour in certain cases, the wiki would be a better place in my opinion than the bug tracker.
Comment 5 David Cook 2020-01-07 02:02:32 UTC
(In reply to Katrin Fischer from comment #4)
> I am sorry, but I don't feel we should keep it open without having something
> broken we can name and fix - it will just remain open forever. If we want to
> document Zebra's behaviour in certain cases, the wiki would be a better
> place in my opinion than the bug tracker.

I think that you might be misunderstanding me, but no worries. I agree about it remaining open forever. 

I have ideas about an alternative bug report that catches errors from Zebra and does something with them. I just don't have the time/energy to work on it. Maybe one day.

But no argument about closing this one in this case.