projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support for approximation
[pazpar2-moved-to-github.git]
/
src
/
client.c
diff --git
a/src/client.c
b/src/client.c
index
26dd6ef
..
f80e302
100644
(file)
--- a/
src/client.c
+++ b/
src/client.c
@@
-1327,6
+1327,14
@@
Odr_int client_get_hits(struct client *cl)
return cl->hits;
}
return cl->hits;
}
+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;
+}
+
int client_get_num_records(struct client *cl)
{
return cl->record_offset;
int client_get_num_records(struct client *cl)
{
return cl->record_offset;