From: Dennis Schafroth Date: Thu, 26 Aug 2010 13:31:35 +0000 (+0200) Subject: Merge branch 'solr_facets' of ssh://git.indexdata.com/home/git/pub/yaz into solr_facets X-Git-Tag: v4.1.0~29 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=e73eb663eceab6bf4e364e30d0b59404c69aae16;hp=-c Merge branch 'solr_facets' of ssh://git.indexdata.com/home/git/pub/yaz into solr_facets --- e73eb663eceab6bf4e364e30d0b59404c69aae16 diff --combined client/client.c index 0227085,f80bb47..3086afe --- a/client/client.c +++ b/client/client.c @@@ -1454,8 -1454,7 +1454,8 @@@ static int send_SRW_searchRequest(cons printf("Only CQL and PQF supported in SRW\n"); return 0; } - sr->u.request->maximumRecords = odr_intdup(out, 0); + // TODO check. + sr->u.request->maximumRecords = odr_intdup(out, 20); sr->u.request->facetList = facet_list; if (record_schema) sr->u.request->recordSchema = record_schema; @@@ -2281,6 -2280,22 +2281,22 @@@ static int only_z3950(void 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) @@@ -2888,8 -2903,6 +2904,8 @@@ static int cmd_find(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) { @@@ -2898,10 -2911,15 +2914,10 @@@ 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) + /* We are not Z39.50 and not SOLR (I think) */ printf("WARN: Currently supported for Z39.50 and SOLR.\n"); } -º/ - /* TODO Wrong odr. Loosing memory */ - ODR odr = odr_createmem(ODR_ENCODE); facet_list = yaz_pqf_parse_facet_list(odr, arg); if (!facet_list)