remove stale $Id$
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / WebService.pod
index a66ee6c..a30d52a 100644 (file)
@@ -1,4 +1,3 @@
-# $Id: WebService.pod,v 1.1 2006-09-29 16:57:18 mike Exp $
 
 package ZOOM::IRSpy::WebService;
 
@@ -24,15 +23,16 @@ Here is a example SRU URL that accesses the IRSpy database of the live
 system (although it will not be accessible to most clients due to
 firewall issues.  It is broken across lines for clarity:
 
-       http://irspy.indexdata.com:3313/IR-Explain---1?
+       http://irspy.indexdata.com:8018/IR-Explain---1?
                version=1.1&
                operation=searchRetrieve&
                query=net.port=3950&
                maximumRecords=10&
                recordSchema=zeerex
+
 =cut
 
-# http://irspy.indexdata.com:3313/IR-Explain---1?version=1.1&operation=searchRetrieve&query=net.port=3950&maximumRecords=10&recordSchema=zeerex
+# http://irspy.indexdata.com:8018/IR-Explain---1?version=1.1&operation=searchRetrieve&query=net.port=3950&maximumRecords=10&recordSchema=zeerex
 
 =pod
 
@@ -41,7 +41,7 @@ tutorial, but briefly, the URL above consists of the following parts:
 
 =over 4
 
-=item http://irspy.indexdata.com:3313
+=item http://irspy.indexdata.com:8018
 
 The base-URL of the SRU server.
 
@@ -107,7 +107,7 @@ record describing the IRSpy database itself.
 This is the principle operation of SRU, combining searching of the
 database and retrieval of the records that are found.  Its behaviour
 is specified primarily by the C<query> parameter, support for which is
-described below, but also by C< C<startRecord>, C<maximumRecords> and
+described below, but also by C<startRecord>, C<maximumRecords> and
 C<recordSchema>.
 
 =item scan
@@ -119,7 +119,7 @@ also by C<maximumTerms> and C<responsePosition>.
 
 Here is an example SRU Scan URL:
 
-       http://irspy.indexdata.com:3313/IR-Explain---1?
+       http://irspy.indexdata.com:8018/IR-Explain---1?
                version=1.1&
                operation=scan&
                scanClause=dc.title=fish
@@ -136,14 +136,147 @@ names are the same as those listed below.
 
 =head2 CQL SUPPORT
 
-I<###>
+The following CQL context sets are supported, and are recognised in
+queries by the specified prefixes:
+
+=over 4
+
+=item cql
+
+The CQL context set.
+http://www.loc.gov/standards/sru/cql/cql-context-set.html
+
+=item rec
+
+The Record Metadata context set.
+http://srw.cheshire3.org/contextSets/rec/1.1/
+
+=item net
+
+The Network context set.
+http://srw.cheshire3.org/contextSets/net/
+
+=item dc
+
+The Dublin Core context set.
+http://www.loc.gov/standards/sru/cql/dc-context-set.html
+
+=item zeerex
+
+The ZeeRex context set.
+http://srw.cheshire3.org/contextSets/ZeeRex/
+
+=back
+
+Within those sets, the following indexes are supported:
+
+=over 4
+
+=item cql.anywhere
+
+=item cql.allRecords
+
+=item rec.id
+
+=item net.protocol
+
+=item net.version
+
+=item net.method
+
+=item net.host
+
+=item net.port
+
+=item net.path
+
+=item dc.title
+
+=item dc.creator
+
+=item zeerex.numberOfRecords
+
+=item zeerex.set
+
+=item zeerex.index
+
+=item zeerex.attributeType
+
+=item zeerex.attributeValue
+
+=item zeerex.schema
+
+=item zeerex.recordSyntax
+
+=item zeerex.supports_relation
+
+=item zeerex.supports_relationModifier
+
+=item zeerex.supports_maskingCharacter
+
+=item zeerex.default_contextSet
+
+=item zeerex.default_index
+
+=back
+
+These indexes may in general be used with all the relations
+C<<>,
+C<<=>,
+C<=>,
+C<E<gt>=>,
+C<E<gt>>,
+C<<E<gt>>
+and
+C<exact>,
+although of course not all combinations of index and relation make
+sense.
+The masking characters
+C<*>
+and
+C<?>
+may be used in all appropriate circumstances, as may the
+word-anchoring character C<^>.
+
+Finally, sorting criteria may be specified within the query itself.
+Since YAZ's CQL parser does not yet implement the recently approved
+CQL 1.2 sorting extension described at
+http://zing.z3950.org/cql/sorting.html a different scheme is used
+involving special relation modifiers, C<sort>, C<sort-desc> and
+C<numeric>.
+
+When a search-term that carries either the C<sort> or C<sort-desc>
+relation-modifier is C<or>'d with a query, the results of that query
+are sorted according to the value associated with the specified index
+- for example, sorted by title if the query is C<or>'d with
+C<dc.title=/sort 0>.  In such sort-specification query terms, the term
+itself (C<0> in this example) is the precendence of the sort-key, with
+zero being highest.  Further less significant sort keys may also be
+specified, using higher-valued terms.  By default, sorting is
+lexicographical (alphabetical); however, if the additional relation
+modified C<numeric> is also specified, then numeric sorting is used.
+
+For example, the query:
+
+ net.host = *.edu and dc.title=^a* or net.port=/sort/numeric 0
+
+Finds records describing services hosted in the C<.edu> domain and
+whose titles' first words begin with the letter C<a>, and sorts the
+results in numeric order of the port number that they run on.  And the
+query:
+
+ net.host = *.edu or net.port=/sort/numeric 0 or net.path=/sort-desc 1
+
+Sorts all the C<.edu>-hosted services numerically by port; and further
+sorts each equivalence class of services running the same port
+alphabetically, descending, by database name.
 
 =head2 RECORD SCHEMAS
 
 The IRSpy Zebra database supports record retrieval using the following
 schemas:
 
-=over4
+=over 4
 
 =item dc