projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f6da80c
)
Attemt to calc approximation not working correctly
author
Dennis Schafroth
<dennis@indexdata.com>
Thu, 12 Apr 2012 20:47:50 +0000
(22:47 +0200)
committer
Dennis Schafroth
<dennis@indexdata.com>
Thu, 12 Apr 2012 20:47:50 +0000
(22:47 +0200)
src/client.c
patch
|
blob
|
history
diff --git
a/src/client.c
b/src/client.c
index
5635083
..
02e592c
100644
(file)
--- a/
src/client.c
+++ b/
src/client.c
@@
-547,10
+547,10
@@
void client_search_response(struct client *cl)
}
else
{
}
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);
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"));
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)
{
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;
}
return cl->hits;
}