+ <sect1 id="tutorial-oai-sru-yazfrontend">
+ <title>Setting up a correct &acro.sru; web service</title>
+
+ <para>
+ The &acro.sru; specification mandates that the &acro.cql; query
+ language is supported and properly configure. Also, the server
+ needs to be able to emit a proper &acro.explain; &acro.xml;
+ record, which is used to determine the capabilities of the
+ specific server instance.
+ </para>
+
+ <para>
+ In this example configuration we exploit the similarities between
+ the &acro.explain; record and the &acro.cql; query language
+ configuration, we generate the later from the former using an
+ &acro.xslt; transformation.
+ <screen>
+ xsltproc conf/explain2cqlpqftxt.xsl conf/explain.xml > conf/cql2pqf.txt
+ </screen>
+ </para>
+
+ <para>
+ We are all set to start the &acro.sru;/acro.z3950; server including
+ &acro.pqf; and &acro.cql; query configuration. It uses the &yaz; frontend
+ server configuration - just type
+ <screen>
+ zebrasrv -f conf/yazserver.xml
+ </screen>
+ </para>
+
+ <para>
+ First, we'd like to be sure that we can see the &acro.explain;
+ &acro.xml; response correctly. You might use either of these equivalent
+ requests:
+ <ulink
+ url="http://localhost:9999">http://localhost:9999
+ </ulink>
+ <ulink
+ url="http://localhost:9999/?version=1.1&operation=explain">
+ http://localhost:9999/?version=1.1&operation=explain
+ </ulink>
+
+ </para>
+
+ <para>
+ Now we can issue true &acro.sru; requests. For example,
+ <literal>dc.title=the
+ and dc.description=fish</literal> results in the following page
+ <ulink
+ url="http://localhost:9999/?version=1.1&operation=searchRetrieve&query=dc.title=the
+ and dc.description=fish
+ &startRecord=1&maximumRecords=1&recordSchema=dc">
+ http://localhost:9999/?version=1.1&operation=searchRetrieve&query=dc.title=the
+ and dc.description=fish &startRecord=1&maximumRecords=1&recordSchema=dc
+ </ulink>
+ </para>
+
+ <para>
+ Scan of indexes is a part of the &acro.sru; server business. For example,
+ scanning the <literal>dc.title</literal> index gives us an idea
+ what search terms are found there
+ <ulink
+ url="http://localhost:9999/?version=1.1&operation=scan&scanClause=dc.title=fish">
+ http://localhost:9999/?version=1.1&operation=scan&scanClause=dc.title=fish
+ </ulink>,
+ whereas
+ <ulink
+ url="http://localhost:9999/?version=1.1&operation=scan&scanClause=dc.identifier=fish">
+ http://localhost:9999/?version=1.1&operation=scan&scanClause=dc.identifier=fish
+ </ulink>
+ accesses the indexed identifiers.
+ </para>
+
+ <para>
+ In addition, all &zebra; internal special element sets or record
+ schema's of the form
+ <literal>zebra::</literal> just work right out of the box
+ <ulink
+ url="http://localhost:9999/?version=1.1&operation=searchRetrieve&query=dc.title=the
+ and dc.description=fish
+ &startRecord=1&maximumRecords=1&recordSchema=zebra::snippet">
+ http://localhost:9999/?version=1.1&operation=searchRetrieve&query=dc.title=the
+ and dc.description=fish &startRecord=1&maximumRecords=1&recordSchema=zebra::snippet
+ </ulink>
+ </para>
+
+
+
+ </sect1>
+