X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=c9351d2fa8c3432b2cbdb3b2b99820073974aef6;hb=25ede22cdd0f258801b169ecb6c787bf8e08ed54;hp=3086afef0d75bf6302b3fcb02134039179649c7a;hpb=e73eb663eceab6bf4e364e30d0b59404c69aae16;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 3086afe..c9351d2 100644 --- a/client/client.c +++ b/client/client.c @@ -284,7 +284,7 @@ int send_apdu(Z_APDU *a) 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; } @@ -1454,8 +1454,7 @@ static int send_SRW_searchRequest(const char *arg) 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; @@ -2914,9 +2913,8 @@ static int cmd_facets(const char *arg) 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); @@ -4317,6 +4315,9 @@ static void handle_srw_response(Z_SRW_searchRetrieveResponse *res) } if (res->numberOfRecords) printf("Number of hits: " ODR_INT_PRINTF "\n", *res->numberOfRecords); + if (res->facetList) { + display_facets(res->facetList); + } for (i = 0; inum_records; i++) handle_srw_record(res->records + i); }