[Koha-bugs] [Bug 17871] New: Can't retrieve facets (or zebra::snippet) from Zebra with YAZ 5.8.1
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jan 10 02:03:24 CET 2017
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 at gmail.com
Reporter: dcook at prosentient.com.au
QA Contact: testopia at bugs.koha-community.org
CC: m.de.rooy at 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-work-td5871444.html
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/f24766f1e9fc5404fc0b512af8607d7f7054f4be
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.
More information about the Koha-bugs
mailing list