X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fclient.c;h=0ded33b3ac96da550ec69bf78f42b9d277613ae8;hb=bddf93024a4a553bd58c79bfd0f840f468f014ef;hp=dcbfd6ce00fe5d06f6b028b1b0ffa43d13df920b;hpb=2f8b2679c4e4d7f482d726ebfee201035d6e3192;p=pazpar2-moved-to-github.git diff --git a/src/client.c b/src/client.c index dcbfd6c..0ded33b 100644 --- a/src/client.c +++ b/src/client.c @@ -762,11 +762,12 @@ void client_start_search(struct client *cl) int present_chunk = 20; // Default chunk size if (opt_present_chunk && strcmp(opt_present_chunk,"")) { present_chunk = atoi(opt_present_chunk); + yaz_log(YLOG_DEBUG, "Present chunk set to %d", present_chunk); } - assert(link); cl->diagnostic = 0; + cl->filtered = 0; if (extra_args && *extra_args) ZOOM_connection_option_set(link, "extraArgs", extra_args); @@ -803,11 +804,13 @@ void client_start_search(struct client *cl) /* A present_chunk less than 1 will disable chunking. */ if (present_chunk > 0 && cl->maxrecs > present_chunk) { sprintf(present_chunk_str, "%d", present_chunk); - ZOOM_connection_option_set(link, "presentChunk", opt_present_chunk); + ZOOM_connection_option_set(link, "presentChunk", present_chunk_str); + yaz_log(YLOG_DEBUG, "Present chunk set to %s", present_chunk_str); } - else + else { ZOOM_connection_option_set(link, "presentChunk", maxrecs_str); - + yaz_log(YLOG_DEBUG, "Present chunk set to %s (maxrecs)", maxrecs_str); + } sprintf(startrecs_str, "%d", cl->startrecs); ZOOM_connection_option_set(link, "start", startrecs_str); @@ -1089,7 +1092,7 @@ static int apply_limit(struct session_database *sdb, for (i = 0; (name = facet_limits_get(facet_limits, i, &value)); i++) { struct setting *s = 0; - + nmem_reset(nmem_tmp); for (s = sdb->settings[PZ_LIMITMAP]; s; s = s->next) { const char *p = strchr(s->name + 3, ':'); @@ -1145,7 +1148,6 @@ static int apply_limit(struct session_database *sdb, break; } } - nmem_reset(nmem_tmp); if (!s) { yaz_log(YLOG_WARN, "Target %s: limit %s used, but no limitmap defined", @@ -1329,7 +1331,7 @@ Odr_int client_get_approximation(struct client *cl) { if (cl->record_offset > 0) { Odr_int approx = ((10 * cl->hits * (cl->record_offset - cl->filtered)) / cl->record_offset + 5) /10; - yaz_log(YLOG_LOG, "%s: Approx: %lld * %d / %d = %lld ", client_get_id(cl), cl->hits, cl->record_offset - cl->filtered, cl->record_offset, approx); + yaz_log(YLOG_DEBUG, "%s: Approx: %lld * %d / %d = %lld ", client_get_id(cl), cl->hits, cl->record_offset - cl->filtered, cl->record_offset, approx); return approx; } return cl->hits;