Bug 27198 - Sync marc21-retrieval-info-auth-dom.xml with retrieval-info-auth-dom.xml
Summary: Sync marc21-retrieval-info-auth-dom.xml with retrieval-info-auth-dom.xml
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Zebra (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: David Cook
QA Contact:
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2020-12-11 04:23 UTC by David Cook
Modified: 2021-01-22 01:28 UTC (History)
3 users (show)

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


Attachments
Bug 27198: Fix syntax in marc21-retrieval-info-auth-dom.xml (1.16 KB, patch)
2020-12-11 04:44 UTC, David Cook
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2020-12-11 04:23:37 UTC
./debian/templates/marc21-retrieval-info-auth-dom.xml is out-dated and should be synchronized with ./etc/zebradb/retrieval-info-auth-dom.xml 

The main issue is that the XML retrieval syntax is wrong which prevents a person from using the Zebra special retrieval elements documented at https://software.indexdata.com/zebra/doc/special-retrieval.html
Comment 1 David Cook 2020-12-11 04:42:21 UTC
Before patch:

root@kohadevbox:koha(bug27198)$ yaz-client unix:/var/run/koha/kohadev/authoritysocket
Connecting...OK.
Sent initrequest.
Connection accepted by v3 target.
ID     : 81
Name   : Zebra Information Server/GFS/YAZ
Version: 4.2.30 98864b44c654645bc16b2c54f822dc2e45a93031
Options: search present delSet triggerResourceCtrl scan sort extendedServices namedResultSets
Elapsed: 0.000754
Z> base authorities
Z> format xml
Z> elements zebra::snippet
Z> find e
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 21, setno 1
SearchResult-1: term=e cnt=21
records returned: 0
Elapsed: 0.002167
Z> show 1
Sent presentRequest (1+1).
Diagnostic message(s) from database:
    [25] Specified element set name not valid for specified database -- v2 addinfo 'zebra::snippet'
nextResultSetPosition = 2
Elapsed: 0.000218
Z> exit
See you later, alligator.

After patch:

root@kohadevbox:koha(bug27198)$ yaz-client unix:/var/run/koha/kohadev/authoritysocket
Connecting...OK.
Sent initrequest.
Connection accepted by v3 target.
ID     : 81
Name   : Zebra Information Server/GFS/YAZ
Version: 4.2.30 98864b44c654645bc16b2c54f822dc2e45a93031
Options: search present delSet triggerResourceCtrl scan sort extendedServices namedResultSets
Elapsed: 0.000840
Z> base authorities
Z> format xml
Z> elements zebra::snippet
Z> find e
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 21, setno 1
SearchResult-1: term=e cnt=21
records returned: 0
Elapsed: 0.002212
Z> show 1
Sent presentRequest (1+1).
Records: 1
Record type: XML
<record xmlns="http://www.indexdata.com/zebra/">
  <snippet name="Any" type="w">Gontarski, S. <s>E</s></snippet>
</record>nextResultSetPosition = 2
Elapsed: 0.013929
Comment 2 David Cook 2020-12-11 04:44:31 UTC
Created attachment 114319 [details] [review]
Bug 27198: Fix syntax in marc21-retrieval-info-auth-dom.xml

This patch fixes the syntax in marc21-retrieval-info-auth-dom.xml,
so that one can use the Zebra special retrieval elements documented
at https://software.indexdata.com/zebra/doc/special-retrieval.html

These are very useful when troubleshooting issues with authority
records in Zebra.
Comment 3 David Cook 2020-12-23 03:55:24 UTC
Listing this one as Academy as it's pretty straight-forward. Happy to help people with this one too.
Comment 4 Victoria Faafia 2021-01-18 23:23:53 UTC
Can you please provide a test plan?
Comment 5 David Cook 2021-01-18 23:43:23 UTC
(In reply to Victoria Faafia from comment #4)
> Can you please provide a test plan?

Ooops I forgot to label it but you should be able to use Comment 1 (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27198#c1) as a test plan.
Comment 6 Eden 2021-01-19 22:06:57 UTC
Followed the test plan but an error kept recurring even after applying patch. Is there a step missing such as rebuilding zebra etc?
Comment 7 David Cook 2021-01-22 01:28:09 UTC
(In reply to Eden from comment #6)
> Followed the test plan but an error kept recurring even after applying
> patch. Is there a step missing such as rebuilding zebra etc?

Ah, yes. My mistake! Not rebuilding Zebra, but restarting Zebra for sure. 

- koha-zebra --stop kohadev
- pkill zebrasrv
- koha-zebra --start kohadev

That should do the trick.

The pkill zebrasrv is there because koha-zebra --stop kohadev won't work if the zebrasrv process has forked child processes.