2 * $Id: zoomtst1.c,v 1.3 2001-11-18 21:14:23 adam Exp $
4 * Synchronous single-target client doing search (but no retrieval)
9 #include <yaz/xmalloc.h>
12 int main(int argc, char **argv)
17 const char *errmsg, *addinfo;
21 fprintf (stderr, "usage:\n%s target query\n", *argv);
22 fprintf (stderr, " eg. bagel.indexdata.dk/gils computer\n");
25 z = ZOOM_connection_new (argv[1], 0);
27 if ((error = ZOOM_connection_error(z, &errmsg, &addinfo)))
29 fprintf (stderr, "Error: %s (%d) %s\n", errmsg, error, addinfo);
33 r = ZOOM_connection_search_pqf (z, argv[2]);
34 if ((error = ZOOM_connection_error(z, &errmsg, &addinfo)))
35 fprintf (stderr, "Error: %s (%d) %s\n", errmsg, error, addinfo);
37 printf ("Result count: %d\n", ZOOM_resultset_size(r));
38 ZOOM_resultset_destroy (r);
39 ZOOM_connection_destroy (z);