}
else if (!yaz_matchstr(sru_method, "solr"))
{
- yaz_solr_encode(gdu->u.HTTP_Request, sr, out, charset);
+ yaz_solr_encode_request(gdu->u.HTTP_Request, sr, out, charset);
}
return send_gdu(gdu);
return 0;
}
sr->u.request->maximumRecords = odr_intdup(out, 0);
-
+ sr->u.request->facetList = facet_list;
if (record_schema)
sr->u.request->recordSchema = record_schema;
if (recordsyntax_size == 1 && !yaz_matchstr(recordsyntax_list[0], "xml"))
return 0;
}
size = strlen(arg);
- if (only_z3950())
- {
- printf("Currently only supported for Z39.50.\n");
- return 0;
+/*
+ MOVE to non-usage of it?
+ 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");
}
- else
- {
- /* TODO Wrong odr. Loosing memory */
- ODR odr = odr_createmem(ODR_ENCODE);
- facet_list = yaz_pqf_parse_facet_list(odr, arg);
+ยบ/
+ /* TODO Wrong odr. Loosing memory */
+ ODR odr = odr_createmem(ODR_ENCODE);
+ facet_list = yaz_pqf_parse_facet_list(odr, arg);
- if (!facet_list)
- {
- printf("Invalid facet list: %s", arg);
- return 0;
- }
- return 1;
+ if (!facet_list)
+ {
+ printf("Invalid facet list: %s", arg);
+ return 0;
}
- return 2;
+ return 1;
}
{
Z_SRW_PDU *sr = 0;
ODR o = odr_createmem(ODR_DECODE);
- ret = yaz_solr_decode(o, hres, &sr);
+ ret = yaz_solr_decode_response(o, hres, &sr);
if (ret == 0 && sr->which == Z_SRW_searchRetrieve_response)
handle_srw_response(sr->u.response);