projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into solr_facets
[yaz-moved-to-github.git]
/
client
/
client.c
diff --git
a/client/client.c
b/client/client.c
index
0227085
..
ba217e7
100644
(file)
--- a/
client/client.c
+++ b/
client/client.c
@@
-1454,8
+1454,7
@@
static int send_SRW_searchRequest(const char *arg)
printf("Only CQL and PQF supported in SRW\n");
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;
sr->u.request->facetList = facet_list;
if (record_schema)
sr->u.request->recordSchema = record_schema;
@@
-2281,6
+2280,22
@@
static int only_z3950(void)
return 0;
}
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_update_common(const char *arg, int version);
static int cmd_update(const char *arg)
@@
-2898,9
+2913,8
@@
static int cmd_facets(const char *arg)
return 0;
}
size = strlen(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);
}
facet_list = yaz_pqf_parse_facet_list(odr, arg);
@@
-4301,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->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);
}
for (i = 0; i<res->num_records; i++)
handle_srw_record(res->records + i);
}