return 0;
}
+static int is_SRW(void)
+{
+ if (!conn)
+ {
+ printf("Not connected yet\n");
+ return 1;
+ }
+ if (protocol == PROTO_HTTP && yaz_matchstr(sru_method, "solr"))
+ {
+ printf("Not supported by SRW\n");
+ return 1;
+ }
+ return 0;
+}
+
+
static int cmd_update_common(const char *arg, int version);
static int cmd_update(const char *arg)
static int cmd_facets(const char *arg)
{
+ /* TODO Wrong odr. Loosing memory */
+ ODR odr = odr_createmem(ODR_ENCODE);
int size = 0;
if (!*arg)
{
return 0;
}
size = strlen(arg);
-/*
- 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");
+ if (is_SRW()) {
+ printf("WARN: No supported for SRW/SRU.\n");
}
-ยบ/
- /* TODO Wrong odr. Loosing memory */
- ODR odr = odr_createmem(ODR_ENCODE);
facet_list = yaz_pqf_parse_facet_list(odr, arg);
if (!facet_list)
}
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);
}