Moved to doc/pazpar2_protocol.*
authorSebastian Hammer <quinn@indexdata.com>
Fri, 12 Jan 2007 15:19:42 +0000 (15:19 +0000)
committerSebastian Hammer <quinn@indexdata.com>
Fri, 12 Jan 2007 15:19:42 +0000 (15:19 +0000)
PROTOCOL [deleted file]

diff --git a/PROTOCOL b/PROTOCOL
deleted file mode 100644 (file)
index 6db19d7..0000000
--- a/PROTOCOL
+++ /dev/null
@@ -1,194 +0,0 @@
-
-Webservice requests are any that refer to filename "search.pz2". Arguments
-are GET-style parameters. Argument 'command' is required and specifies
-command. Any request not recognized as a webservice request as described,
-are forwarded to the HTTP server specified in configuration.  This way, the webserver
-can host the user interface (itself dynamic or static HTML), and AJAX-style
-calls can be used from JS to interact with the search logic.
-
-Commands:
-
-init
-
-Initializes a session. Returns session ID to be used in subsequent requests. Example:
-
-search.pz2?command=init
-
-Response example:
-
-<init>
-  <status>OK</status>
-  <session>2044502273</session>
-</init>
-
-ping
-
-Keeps a session alive. An idle session will time out after one minute. The
-ping command can be used to keep the session alive absent other activity. It
-is suggested that any browser client have a simple alarm handler which
-sends a ping every 50 seconds or so once a session has been initialized.
-
-Example:
-
-search.pz?command=ping&session=2044502273
-
-Response example:
-
-<ping>
-  <status>OK</status>
-</ping>
-
-search
-
-Launches a search, parameters:
-
-session
-query
-
-Example:
-
-search.pz2?session=2044502273&command=search&query=computer
-
-Response example:
-
-<search>
-  <status>OK</status>
-</search>
-
-stat
-
-Provides status of ongoing search. Parameters:
-
-session
-
-Example:
-
-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
-  <unconnected>0</unconnected>     -- Number of disconnected clients
-  <connecting>0</connecting>       -- Number of clients in connecting state
-  <initializing>0</initializing>   -- Number of clients initializing
-  <searching>0</searching>         -- ... searching
-  <presenting>0</presenting>       -- ... presenting
-  <idle>1</idle>                   -- ... idle (not doing anything)
-  <failed>0</failed>               -- ... Connection failed
-  <error>0</error>                 -- ... Error was produced somewhere
-</stat>
-
-show
-
-Shows records retrieved
-
-parameters:
-
-session
-start      -- 0-indexed!!
-num        -- default=20
-block      -- 0 or 1
-
-If block is set, the command will hang until there are records ready
-to display. Use this to show first records rapidly without requiring rapid
-polling.
-
-Example:
-
-search.pz2?session=2044502273&command=show&start=0&num=2
-
-Output:
-
-<show>
-  <status>OK</status>
-  <activeclients>3</activeclients>
-  <merged>6</merged>
-  <total>7</total>
-  <start>0</start>
-  <num>2</num>
-  <hit>
-    <md-title>How to program a computer, by Jack Collins</md-title>
-    <count>2</count> <!-- Number of merged records -->
-    <recid>6</recid>
-  </hit>
-  <hit>
-    <md-title>
-  Computer processing of dynamic images from an Anger scintillation camera :
-  the proceedings of a workshop /
-    </md-title>
-    <recid>2</recid>
-  </hit>
-</show>
-
-record
-
-Retrieves a detailed record.
-
-Parameters: id -- record ID as provided by the show command
-
-Example:
-
-search.pz2?session=605047297&command=record&id=3
-
-Example output:
-
-<record>
-  <md-title>
-       The Puget Sound Region : a portfolio of thematic computer maps /
-  </md-title>
-  <md-date>1974</md-date>
-  <md-author>Mairs, John W.</md-author>
-  <md-subject>Cartography</md-subject>
-</record>
-
-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>
-