2 Webservice requests are any that refer to filename "search.pz2". Arguments
3 are GET-style parameters. Argument 'command' is required and specifies
4 command. Any request not recognized as a webservice request as described,
5 are forwarded to the HTTP server specified in configuration. This way, the webserver
6 can host the user interface (itself dynamic or static HTML), and AJAX-style
7 calls can be used from JS to interact with the search logic.
13 Initializes a session. Returns session ID to be used in subsequent requests. Example:
15 search.pz2?command=init
21 <session>2044502273</session>
26 Keeps a session alive. An idle session will time out after one minute. The
27 ping command can be used to keep the session alive absent other activity. It
28 is suggested that any browser client have a simple alarm handler which
29 sends a ping every 50 seconds or so once a session has been initialized.
33 search.pz?command=ping&session=2044502273
43 Launches a search, parameters:
50 search.pz2?session=2044502273&command=search&query=computer
60 Provides status of ongoing search. Parameters:
66 search.pz2?session=2044502273&command=stat
71 <activeclients>3</activeclients>
72 <hits>7</hits> -- Total hitcount
73 <records>7</records> -- Total number of records fetched
74 <clients>1</clients> -- Total number of associated clients
75 <unconnected>0</unconnected> -- Number of disconnected clients
76 <connecting>0</connecting> -- Number of clients in connecting state
77 <initializing>0</initializing> -- Number of clients initializing
78 <searching>0</searching> -- ... searching
79 <presenting>0</presenting> -- ... presenting
80 <idle>1</idle> -- ... idle (not doing anything)
81 <failed>0</failed> -- ... Connection failed
82 <error>0</error> -- ... Error was produced somewhere
87 Shows records retrieved
96 If block is set, the command will hang until there are records ready
97 to display. Use this to show first records rapidly without requiring rapid
102 search.pz2?session=2044502273&command=show&start=0&num=2
108 <activeclients>3</activeclients>
114 <md-title>How to program a computer, by Jack Collins</md-title>
115 <count>2</count> <!-- Number of merged records -->
120 Computer processing of dynamic images from an Anger scintillation camera :
121 the proceedings of a workshop /
129 Retrieves a detailed record.
131 Parameters: id -- record ID as provided by the show command
135 search.pz2?session=605047297&command=record&id=3
141 The Puget Sound Region : a portfolio of thematic computer maps /
143 <md-date>1974</md-date>
144 <md-author>Mairs, John W.</md-author>
145 <md-subject>Cartography</md-subject>
150 Retrieves term list(s)
155 name -- comma-separated list of termlist names (default "subject")
159 search.pz2?session=2044502273&command=termlist&name=author,subject
164 <activeclients>3</activeclients>
167 <name>Donald Knuth</name>
168 <frequency>10</frequency>
171 <name>Robert Pirsig</name>
172 <frequency>2</frequency>
175 <list name="subject">
177 <name>Computer programming</name>
178 <frequency>10</frequency>
183 For the special termlist name "xtargets", results are returned about the targets
184 which have returned the most hits. The 'term' subtree has additional elements,
185 specifically a state and diagnostic field (in the example below, a target ID is
186 returned in place of 'name'. This may or may not change later.
189 <name>library2.mcmaster.ca</name>
190 <frequency>11734</frequency>
191 <state>Client_Idle</state>
192 <diagnostic>0</diagnostic>