From a41de3ffcd8a1fa6e2613083170390152f54a062 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Thu, 12 Apr 2012 22:47:50 +0200 Subject: [PATCH] Attemt to calc approximation not working correctly --- src/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 1.7.10.4