Summary: | Can't retrieve facets (or zebra::snippet) from Zebra with YAZ 5.8.1 | ||
---|---|---|---|
Product: | Koha | Reporter: | David Cook <dcook> |
Component: | Z39.50 / SRU / OpenSearch Servers | Assignee: | David Cook <dcook> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | colin.campbell, julian.maurice, kyle, m.de.rooy, mtj |
Version: | Main | Keywords: | Academy |
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 17871 - Can't retrieve facets (or zebra::snippet) from Zebra with YAZ 5.8.1
Signed off patch Bug 17871: Remove zebra::snippet to allow access to facets in YAZ 5.8.1+ Bug 17871: (followup) Remove zebra::* from the packages templates |
Description
David Cook
2017-01-10 01:03:24 UTC
I've sent emails to Adam Dickmeiss and info@indexdata.com, so hopefully IndexData can shine some light on this one. In the meantime, I think a configuration change would be acceptable. Created attachment 58718 [details] [review] Bug 17871 - Can't retrieve facets (or zebra::snippet) from Zebra with YAZ 5.8.1 Remove line <retrieval syntax="xml" name="zebra::*" />, which causes retrieval failures for zebra::* elements when using YAZ 5.8.1. I've received a reply from Adam at IndexData, and he's included a fix in YAZ 5.20.0: --- 5.20.0 2017/01/10 yaz-url: ignore content-length for HTTP method HEAD YAZ-878 retrieval: fix incorrect backend schema YAZ-877. Should fix https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 record_conv: allow HTTP method to be set for authority lookup Here's the contents of the email that Adam sent me: Hi David, we've looked at this and it should be fixed as part of YAZ [5.20.0] which will be released shortly. For a configuration like this: <retrieval syntax="xml" name="zebra::*"/> and using elem zebra::snippet the backend_schema i set to the name attribute zebra::* . The expected result is that the backend schema is set to the used element set zebra::snippet (Zebra issues error when getting zebra::*, but supports zebra::snippet). For YAZ 5.8.0 and earlier, the first rule was matched .. For YAZ 5.8.1 the 2nd rule is matched when using zebra::snippet. So to some extend this error was hidden by the first rule, but the bug has probably always been there. <retrieval syntax="xml"/> <retrieval syntax="xml" name="zebra::*"/> -- So in 5.8.0, the second rule wasn't being used anyway, so I think we're safe to remove it. Adam from Indexdata has confirmed via email that we only need the <retrieval syntax="xml"/> line and that it will work with all YAZ versions. So there should be no barriers to removing <retrieval syntax="xml" name="zebra::*"/>. Found the original email I wrote about this last year: http://www.mail-archive.com/koha-devel@lists.koha-community.org/msg08132.html _TEST PLAN_ #NOTE: You won't be able to test this using a Gitifid Koha, since it's an update to Zebra files. If you're using a Gitifid Koha, you'll have to apply the patch manually. 0) Install YAZ with a version >= 5.8.1 and < 5.20.0*. 1) Build Koha from source using "make" 2) Ensure that Zebra facets are turned on in koha-conf.xml 3) Try to search in the OPAC, and note that no facets appear 4) Apply th patch 5) Build Koha from source using "Make" 6) Try to search in the OPAC, and note that facets now appear *If you're using Indexdata's Debian repository, you'll need to pin the package so that you don't install the 5.20.0 where the software bug in YAZ itself is actually fixed, since we're testing configuration as a fix here. Created attachment 59400 [details] [review] Signed off patch Signed off - tested patch worked both against versions of yaz exhibiting the bug and an older release which did not exhibit it both provided facets with the config change in place Update status to Signed Off You're a champion, Colin! Thanks! Created attachment 59495 [details] [review] Bug 17871: Remove zebra::snippet to allow access to facets in YAZ 5.8.1+ This patch restores access to zebra facets (or zebra::snippet) with YAZ 5.8.1 or higher. It was failing due to The <retrieval syntax="xml" name="zebra::*" /> entry in retrieval-info-bib-dom.xml which IndexData said it wasn't even needed to get that access. Edit: I amended the commit message (tcohen) Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> I tested on kohadevbox and found no regression or behaviour change. I will provide a followup for the packages. Created attachment 59496 [details] [review] Bug 17871: (followup) Remove zebra::* from the packages templates Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Pushed to master for 17.05, thanks David, Tomas! These patches have been pushed to 16.11.x and will be in 16.11.04. Pushed to 3.22.x for 3.22.17 Pushed to 16.05.x, for 16.05.10 release |