/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2010 Index Data
+ * Copyright (C) 1995-2011 Index Data
* See the file LICENSE for details.
*/
/** \file client.c
* \brief yaz-client program
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
do_hex_dump(buf, len);
if (cs_put(conn, buf, len) < 0)
{
- fprintf(stderr, "cs_put: %s", cs_errmsg(cs_errno(conn)));
+ fprintf(stderr, "cs_put: %s\n", cs_errmsg(cs_errno(conn)));
close_session();
return 0;
}
printf("Only CQL and PQF supported in SRW\n");
return 0;
}
- // TODO check.
- sr->u.request->maximumRecords = odr_intdup(out, 20);
+ sr->u.request->maximumRecords = odr_intdup(out, 0);
sr->u.request->facetList = facet_list;
if (record_schema)
sr->u.request->recordSchema = record_schema;
return 0;
}
size = strlen(arg);
- if (only_z3950() && !yaz_matchstr(sru_method, "solr")) {
- /* We are not Z39.50 and not SOLR (I think) */
- printf("WARN: Currently supported for Z39.50 and SOLR.\n");
+ if (is_SRW()) {
+ printf("WARN: No supported for SRW/SRU.\n");
}
facet_list = yaz_pqf_parse_facet_list(odr, arg);
}
if (res->numberOfRecords)
printf("Number of hits: " ODR_INT_PRINTF "\n", *res->numberOfRecords);
+ if (res->facetList) {
+ display_facets(res->facetList);
+ }
for (i = 0; i<res->num_records; i++)
handle_srw_record(res->records + i);
}