The SRU specification mandates that the CQL query language is supported and properly configured. Also, the server needs to be able to emit a proper Explain XML record, which is used to determine the capabilities of the specific server instance.
In this example configuration we exploit the similarities between the Explain record and the CQL query language configuration, we generate the later from the former using an XSLT transformation.
xsltproc conf/explain2cqlpqftxt.xsl conf/explain.xml > conf/cql2pqf.txt
We are all set to start the SRU/Z39.50 server including PQF and CQL query configuration. It uses the YAZ frontend server configuration - just type
zebrasrv -f conf/yazserver.xml
First, we'd like to be sure that we can see the Explain XML response correctly. You might use either of these equivalent requests: http://localhost:9999 or http://localhost:9999/?version=1.1&operation=explain
Now we can issue true SRU requests. For example,
dc.title=the
and dc.description=fish
results in the following page
http://localhost:9999/?version=1.1&operation=searchRetrieve&query=dc.title=the and dc.description=fish &startRecord=1&maximumRecords=1&recordSchema=dc
Scan of indexes is a part of the SRU server business. For example,
scanning the dc.title
index gives us an idea
what search terms are found there
http://localhost:9999/?version=1.1&operation=scan&scanClause=dc.title=fish
,
whereas
http://localhost:9999/?version=1.1&operation=scan&scanClause=dc.identifier=fish
accesses the indexed identifiers.
In addition, all Zebra internal special element sets or record
schema's of the form
zebra::
just work right out of the box
http://localhost:9999/?version=1.1&operation=searchRetrieve&query=dc.title=the and dc.description=fish &startRecord=1&maximumRecords=1&recordSchema=zebra::snippet