[Bug 17871] New: Can't retrieve facets (or zebra::snippet) from Zebra with YAZ 5.8.1
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 Bug ID: 17871 Summary: Can't retrieve facets (or zebra::snippet) from Zebra with YAZ 5.8.1 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Z39.50 / SRU / OpenSearch Servers Assignee: gmcharlt@gmail.com Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Colin Campbell and Frédéric Demians mentioned in 2015 that Zebra facets don't work with YAZ 5.8.1: https://lists.katipo.co.nz/public/koha/2015-February/041987.html In 2016, Zeno said he couldn't get zebra::snippet to work: http://koha.1045719.n5.nabble.com/Zebra-the-elements-zebra-snippet-doesn-t-w... I've looked at Indexdata's YAZ git repo for 5.8.1: https://github.com/indexdata/yaz/blame/v5.8.1/src/retrieval.c And I think the problem is this commit: https://github.com/indexdata/yaz/commit/f24766f1e9fc5404fc0b512af8607d7f7054... At first, I thought the problem was with yaz_match_glob, but I've tested this function independently, and I think it's OK. I think the problem might be with how "el_best" is getting set. In theory, <retrieval syntax="xml"/> should be selected as el_best first... then zebra::* should be selected as it should have a true value returned from yaz_match_glob. (Note that "return 0" appears to indicate success for yaz_retrieval_request.) So if you try to use facets with YAZ 5.8.1, you get the following from Zebra: [25] Specified element set name not valid for specified database -- v2 addinfo ''. That makes it seem like el_best isn't being set at all... but I don't know. I'm going to email Indexdata and see what they come up with for this one. But in any case... I have a solution for now. If we remove the line <retrieval syntax="xml" name="zebra::*" /> and restart Zebra, we can get results using zebra::facet and zebra::snippet. I've tested this change with OpenSuse Leap 42.2 with Zebra 2.0.60 and YAZ 5.8.1, and it works, but I'd be interested in hearing about other people's experiences with older (and newer) versions of YAZ. With commit 67abcc64, Marcel actually removed most unnecessary retrieval elements, but Tomas added them back with ca074c92 along with the zebra::* line. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Created attachment 58718 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58718&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- 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::*"/>. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- Found the original email I wrote about this last year: http://www.mail-archive.com/koha-devel@lists.koha-community.org/msg08132.htm... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- _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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58718|0 |1 is obsolete| | CC| |colin.campbell@ptfs-europe. | |com --- Comment #8 from Colin Campbell <colin.campbell@ptfs-europe.com> --- Created attachment 59400 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59400&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #9 from Colin Campbell <colin.campbell@ptfs-europe.com> --- Update status to Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 --- Comment #10 from David Cook <dcook@prosentient.com.au> --- You're a champion, Colin! Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 59495 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59495&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59400|0 |1 is obsolete| | --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 59496 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59496&action=edit Bug 17871: (followup) Remove zebra::* from the packages templates Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks David, Tomas! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Pushed to Master |Pushed to Stable --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- These patches have been pushed to 16.11.x and will be in 16.11.04. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #15 from Julian Maurice <julian.maurice@biblibre.com> --- Pushed to 3.22.x for 3.22.17 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17871 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #16 from Mason James <mtj@kohaaloha.com> --- Pushed to 16.05.x, for 16.05.10 release -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org