Added date support (md-date in show command).
[pazpar2-moved-to-github.git] / PROTOCOL
index d545df4..0999252 100644 (file)
--- a/PROTOCOL
+++ b/PROTOCOL
@@ -1,7 +1,8 @@
 
 Webservice requests are any that refer to filename "search.pz2". Arguments
 are GET-style parameters. Argument 'command' is required and specifies
-command.
+command. Any request not recognized as a webservice request as described,
+are forwarded to the HTTP server specified in option -p.
 
 Commands:
 
@@ -65,6 +66,7 @@ search.pz2?session=2044502273&command=stat
 Output:
 
 <stat>
+  <activeclients>3</activeclients>
   <hits>7</hits>                   -- Total hitcount
   <records>7</records>             -- Total number of records fetched
   <clients>1</clients>             -- Total number of associated clients
@@ -101,18 +103,66 @@ Output:
 
 <show>
   <status>OK</status>
+  <activeclients>3</activeclients>
   <merged>6</merged>
   <total>7</total>
   <start>0</start>
   <num>2</num>
   <hit>
-    <title>How to program a computer, by Jack Collins</title>
+    <md-title>How to program a computer, by Jack Collins</md-title>
     <count>2</count> <!-- Number of merged records -->
   </hit>
   <hit>
-    <title>
+    <md-title>
   Computer processing of dynamic images from an Anger scintillation camera :
   the proceedings of a workshop /
-    </title>
+    </md-title>
   </hit>
 </show>
+
+termlist
+
+Retrieves term list(s)
+
+parameters:
+
+session
+name       -- comma-separated list of termlist names (default "subject")
+
+Example:
+
+search.pz2?session=2044502273&command=termlist&name=author,subject
+
+Output:
+
+<termlist>
+  <activeclients>3</activeclients>
+  <list name="author">
+    <term>
+      <name>Donald Knuth</name>
+      <frequency>10</frequency>
+    </term>
+      <term>
+      <name>Robert Pirsig</name>
+      <frequency>2</frequency>
+    </term>
+  </list>
+  <list name="subject">
+    <term>
+      <name>Computer programming</name>
+      <frequency>10</frequency>
+    </term>
+  </list>
+</termlist>
+
+For the special termlist name "xtargets", results are returned about the targets
+which have returned the most hits. The 'term' subtree has additional elements,
+specifically a state and diagnostic field (in the example below, a target ID is
+returned in place of 'name'. This may or may not change later.
+
+<term>
+  <name>library2.mcmaster.ca</name>
+  <frequency>11734</frequency>
+  <state>Client_Idle</state>
+  <diagnostic>0</diagnostic>
+</term>