Bug 9612: fix SRU response for DOM indexing
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 20 Mar 2014 12:24:11 +0000 (13:24 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 5 May 2014 20:28:04 +0000 (20:28 +0000)
This patch makes changes to koha-conf.xml by removing the fallback section
from biblioserver and authserver. The information is in a include file on
the same server (no need to fall back) and moreover, some information
is not up-to-date and should be moved elsewhere.

The patch also simplifies the DOM retrieval-info files for auth and bib.
And eliminates superfluous F and usmarc from the dom-config files. (I felt
the urge to remove marcxml too, but left it for now; see also the second
patch.) For reference, look at the marcxml example files of Zebra.

NOTE: This patch does not deal with the Debian package installs. In the
same way koha-conf-site.xml.in, and *-retrieval-info-* could be adjusted.

Test plan:
[1] Run at least a dev install in order to copy the new files to your
    Zebra folders. Choose for DOM indexing.
    Enable the SRU server on port 9998 (small edit in koha-conf.xml).
[2] Restart Zebra and reindex -a -b -x.
[3] Verify if a search from Koha still functions as expected.
    Check the SRU output on port 9998. NOTE: If you do not pass recordSchema,
    you should get back a marc response now (instead of index schema).
    Bonus: Add your server as a Z3950 target to another Koha install. And
    perform a Z3950 search from the other server to your new install.
    Bonus: Check response from the auth and biblio socket via yaz-client.
[4] Reindex again with -a -b but without -x.
[5] Repeat Koha search, SRU response (Z3950, yaz-client).

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
etc/koha-conf.xml
etc/zebradb/authorities/etc/dom-config-marc.xml
etc/zebradb/authorities/etc/dom-config.xml
etc/zebradb/biblios/etc/dom-config-marc.xml
etc/zebradb/biblios/etc/dom-config.xml
etc/zebradb/retrieval-info-auth-dom.xml
etc/zebradb/retrieval-info-bib-dom.xml

index 72da2de..26f53b7 100644 (file)
@@ -37,74 +37,8 @@ __PAZPAR2_TOGGLE_XML_POST__
     <directory>__ZEBRA_DATA_DIR__/biblios</directory>
     <config>__ZEBRA_CONF_DIR__/__ZEBRA_BIB_CFG__</config>
     <cql2rpn>__ZEBRA_CONF_DIR__/pqf.properties</cql2rpn>
-     <!-- <docpath>xsl</docpath> -->
-     <!-- <stylesheet>xsl/default.xsl</stylesheet> -->
-     <!-- <maximumrecordsize>2000000</maximumrecordsize> -->
-    <xi:include href="__KOHA_CONF_DIR__/zebradb/__BIB_RETRIEVAL_CFG__"
-                xmlns:xi="http://www.w3.org/2001/XInclude">
-      <xi:fallback>
-     <retrievalinfo>
-       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/>
-       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="B"/>
-       <retrieval syntax="xml" name="F"/>
-       <retrieval syntax="xml" name="B"/>
-       <retrieval syntax="xml" name="marcxml"
-                  identifier="info:srw/schema/1/marcxml-v1.1">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="dc">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2DC.xsl"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="mods">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2MODS.xsl"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="rdfdc">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RDFDC.xsl"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="rss2">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RSS2.xsl"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="utils">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slimUtils.xsl"/>
-         </backend>
-       </retrieval>
-     </retrievalinfo>
-      </xi:fallback>
-      </xi:include>
-    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-biblios.xml"
-                xmlns:xi="http://www.w3.org/2001/XInclude">
-      <xi:fallback>
-      <explain xmlns="http://explain.z3950.org/dtd/2.0/">
-          <serverInfo>
-            <host>__ZEBRA_SRU_HOST__</host>
-            <port>__ZEBRA_SRU_BIBLIOS_PORT__</port>
-            <database>biblios</database>
-          </serverInfo>
-        </explain>
-      </xi:fallback>
-    </xi:include>
+    <xi:include href="__KOHA_CONF_DIR__/zebradb/__BIB_RETRIEVAL_CFG__" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-biblios.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 </server>
 <serverinfo id="biblioserver">
         <ccl2rpn>__ZEBRA_CONF_DIR__/ccl.properties</ccl2rpn>
@@ -117,65 +51,8 @@ __PAZPAR2_TOGGLE_XML_POST__
     <directory>__ZEBRA_DATA_DIR__/authorities</directory>
     <config>__ZEBRA_CONF_DIR__/__ZEBRA_AUTH_CFG__</config>
     <cql2rpn>__ZEBRA_CONF_DIR__/pqf.properties</cql2rpn>
-     <!-- <docpath>xsl</docpath> -->
-     <!-- <stylesheet>xsl/default.xsl</stylesheet> -->
-     <!-- <maximumrecordsize>2000000</maximumrecordsize> -->
-    <xi:include href="__KOHA_CONF_DIR__/zebradb/__AUTH_RETRIEVAL_CFG__"
-                xmlns:xi="http://www.w3.org/2001/XInclude">
-      <xi:fallback>
-     <retrievalinfo>
-       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/>
-       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="B"/>
-       <retrieval syntax="xml" name="marcxml"
-                  identifier="info:srw/schema/1/marcxml-v1.1">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="dc">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2DC.xsl"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="mods">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2MODS.xsl"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="rdfdc">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RDFDC.xsl"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="utils">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slimUtils.xsl"/>
-         </backend>
-       </retrieval>
-     </retrievalinfo>
-      </xi:fallback>
-    </xi:include>
-    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-authorities.xml"
-                xmlns:xi="http://www.w3.org/2001/XInclude">
-      <xi:fallback>
-      <explain xmlns="http://explain.z3950.org/dtd/2.0/">
-          <serverInfo>
-            <host>__ZEBRA_SRU_HOST__</host>
-            <port>__ZEBRA_SRU_AUTHORITIES_PORT__</port>
-            <database>authorities</database>
-          </serverInfo>
-        </explain>
-      </xi:fallback>
-    </xi:include>
+    <xi:include href="__KOHA_CONF_DIR__/zebradb/__AUTH_RETRIEVAL_CFG__" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-authorities.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 </server>
 <serverinfo id="authorityserver">
     <ccl2rpn>__ZEBRA_CONF_DIR__/ccl.properties</ccl2rpn>
@@ -189,71 +66,8 @@ __PAZPAR2_TOGGLE_XML_POST__
     <directory>__ZEBRA_DATA_DIR__/biblios</directory>
     <config>__ZEBRA_CONF_DIR__/__ZEBRA_BIB_CFG__</config>
     <cql2rpn>__ZEBRA_CONF_DIR__/pqf.properties</cql2rpn>
-    <xi:include href="__KOHA_CONF_DIR__/zebradb/__BIB_RETRIEVAL_CFG__"
-                xmlns:xi="http://www.w3.org/2001/XInclude">
-      <xi:fallback>
-     <retrievalinfo>
-       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="F"/>
-       <retrieval syntax="__ZEBRA_MARC_FORMAT__" name="B"/>
-       <retrieval syntax="xml" name="F"/>
-       <retrieval syntax="xml" name="B"/>
-       <retrieval syntax="xml" name="marcxml"
-                  identifier="info:srw/schema/1/marcxml-v1.1">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="dc">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2DC.xsl"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="mods">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2MODS.xsl"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="rdfdc">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RDFDC.xsl"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="rss2">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RSS2.xsl"/>
-         </backend>
-       </retrieval>
-       <retrieval syntax="xml" name="utils">
-         <backend syntax="__ZEBRA_MARC_FORMAT__" name="F">
-           <marc inputformat="marc" outputformat="marcxml"
-                 inputcharset="utf-8"/>
-           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slimUtils.xsl"/>
-         </backend>
-       </retrieval>
-     </retrievalinfo>
-      </xi:fallback>
-    </xi:include>
-    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-biblios.xml"
-                xmlns:xi="http://www.w3.org/2001/XInclude">
-      <xi:fallback>
-      <explain xmlns="http://explain.z3950.org/dtd/2.0/">
-          <serverInfo>
-            <host>__ZEBRA_SRU_HOST__</host>
-            <port>__ZEBRA_SRU_BIBLIOS_PORT__</port>
-            <database>biblios</database>
-          </serverInfo>
-        </explain>
-      </xi:fallback>
-    </xi:include>
+    <xi:include href="__KOHA_CONF_DIR__/zebradb/__BIB_RETRIEVAL_CFG__" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-biblios.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 </server>
 <serverinfo id="publicserver">
         <ccl2rpn>__ZEBRA_CONF_DIR__/ccl.properties</ccl2rpn>
index 4e2e57e..3c2e267 100644 (file)
@@ -30,15 +30,10 @@ Authorities DOM config for MARC ISO2709 input
   <extract name="index">
     <xslt stylesheet="authority-zebra-indexdefs.xsl"/>
   </extract>
-  <retrieve name="F">
-    <xslt stylesheet="identity.xsl" />
-  </retrieve>
-  <retrieve name="usmarc">
-    <xslt stylesheet="identity.xsl" />
-  </retrieve>
   <retrieve name="marc">
     <xslt stylesheet="identity.xsl" />
   </retrieve>
+  <!-- marcxml here maybe somewhat superfluous -->
   <retrieve name="marcxml">
     <xslt stylesheet="identity.xsl" />
   </retrieve>
index da59247..3a2b886 100644 (file)
@@ -30,15 +30,10 @@ Authorities DOM config for MARC XML input
   <extract name="index">
     <xslt stylesheet="authority-zebra-indexdefs.xsl"/>
   </extract>
-  <retrieve name="F">
-    <xslt stylesheet="identity.xsl" />
-  </retrieve>
-  <retrieve name="usmarc">
-    <xslt stylesheet="identity.xsl" />
-  </retrieve>
   <retrieve name="marc">
     <xslt stylesheet="identity.xsl" />
   </retrieve>
+  <!-- marcxml here maybe somewhat superfluous -->
   <retrieve name="marcxml">
     <xslt stylesheet="identity.xsl" />
   </retrieve>
index b47cbb4..60d25e2 100644 (file)
@@ -30,15 +30,10 @@ Bibliographic DOM config for MARC ISO2709 input
   <extract name="index">
     <xslt stylesheet="biblio-zebra-indexdefs.xsl"/>
   </extract>
-  <retrieve name="F">
-    <xslt stylesheet="identity.xsl" />
-  </retrieve>
-  <retrieve name="usmarc">
-    <xslt stylesheet="identity.xsl" />
-  </retrieve>
   <retrieve name="marc">
     <xslt stylesheet="identity.xsl" />
   </retrieve>
+  <!-- marcxml here maybe somewhat superfluous -->
   <retrieve name="marcxml">
     <xslt stylesheet="identity.xsl" />
   </retrieve>
index ac261c0..d475159 100644 (file)
@@ -30,15 +30,10 @@ Bibliographic DOM config for MARC XML input
   <extract name="index">
     <xslt stylesheet="biblio-zebra-indexdefs.xsl"/>
   </extract>
-  <retrieve name="F">
-    <xslt stylesheet="identity.xsl" />
-  </retrieve>
-  <retrieve name="usmarc">
-    <xslt stylesheet="identity.xsl" />
-  </retrieve>
   <retrieve name="marc">
     <xslt stylesheet="identity.xsl" />
   </retrieve>
+  <!-- marcxml here maybe somewhat superfluous -->
   <retrieve name="marcxml">
     <xslt stylesheet="identity.xsl" />
   </retrieve>
index f848012..c966937 100644 (file)
@@ -14,9 +14,5 @@
             outputcharset="utf-8"/>
     </backend>
   </retrieval>
-  <retrieval syntax="xml" name="index"/> <!-- allow viewing index entries -->
-  <retrieval syntax="xml" name="marc"
-             identifier="info:srw/schema/1/marcxml-v1.1"/>
-  <retrieval syntax="xml" name="marcxml"
-             identifier="info:srw/schema/1/marcxml-v1.1"/>
+  <retrieval syntax="xml"/>
 </retrievalinfo>
index f848012..c966937 100644 (file)
@@ -14,9 +14,5 @@
             outputcharset="utf-8"/>
     </backend>
   </retrieval>
-  <retrieval syntax="xml" name="index"/> <!-- allow viewing index entries -->
-  <retrieval syntax="xml" name="marc"
-             identifier="info:srw/schema/1/marcxml-v1.1"/>
-  <retrieval syntax="xml" name="marcxml"
-             identifier="info:srw/schema/1/marcxml-v1.1"/>
+  <retrieval syntax="xml"/>
 </retrievalinfo>