+ rc=zebra_admin_exchange_record(zh, base, rec, strlen(rec),
+ id, strlen(id), atoi(action));
+ return rc;
+}
+
+/**********************************
+ * Searching and retrieving
+ */
+
+static int cmd_search_pqf( char *args[], WRBUF outbuff)
+{
+ int hits=0;
+ char *set=args[1];
+ char *qry=restargs(args,2);
+ int rc;
+ rc=zebra_search_PQF(zh, qry, set, &hits);
+ if (0==rc)
+ wrbuf_printf(outbuff,"%d hits found\n",hits);
+ return rc;
+}
+
+static int cmd_find( char *args[], WRBUF outbuff)
+{
+ char *setname=DEFAULTRESULTSET;
+ int rc;
+ int hits=0;
+ WRBUF qry=wrbuf_alloc();
+ if (0==strstr(args[0],"@attr"))
+ wrbuf_puts(qry, "@attr 1=/ ");
+ wrbuf_puts(qry,restargs(args,1));
+ if (!zh)
+ onecommand("quickstart", outbuff, "");
+ wrbuf_printf(outbuff, "find %s\n",wrbuf_buf(qry));
+ rc=zebra_search_PQF(zh, wrbuf_buf(qry), setname, &hits);
+ if (0==rc)