From: Dennis Schafroth Date: Thu, 12 Apr 2012 20:47:50 +0000 (+0200) Subject: Attemt to calc approximation not working correctly X-Git-Tag: v1.6.13~54 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=a41de3ffcd8a1fa6e2613083170390152f54a062;p=pazpar2-moved-to-github.git Attemt to calc approximation not working correctly --- diff --git a/src/client.c b/src/client.c index 5635083..02e592c 100644 --- a/src/client.c +++ b/src/client.c @@ -547,10 +547,10 @@ void client_search_response(struct client *cl) } else { - yaz_log(YLOG_DEBUG, "client_search_response: hits " ODR_INT_PRINTF, cl->hits); client_report_facets(cl, resultset); cl->record_offset = cl->startrecs; cl->hits = ZOOM_resultset_size(resultset); + yaz_log(YLOG_DEBUG, "client_search_response: hits " ODR_INT_PRINTF, cl->hits); if (cl->suggestions) client_suggestions_destroy(cl); cl->suggestions = client_suggestions_create(ZOOM_resultset_option_get(resultset, "suggestions")); @@ -1330,7 +1330,7 @@ Odr_int client_get_approximation(struct client *cl) { int records = cl->record_offset + cl->filtered; if (records > 0) - return cl->hits * cl->record_offset / records; + return (cl->hits * cl->record_offset) / records; return cl->hits; }