projects
/
yaz-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:
ddf3fef
)
Add missing facet function resultset_get_facet_field
author
Dennis Schafroth
<dennis@indexdata.com>
Thu, 22 Jul 2010 15:12:23 +0000
(17:12 +0200)
committer
Dennis Schafroth
<dennis@indexdata.com>
Thu, 22 Jul 2010 15:12:23 +0000
(17:12 +0200)
src/zoom-c.c
patch
|
blob
|
history
diff --git
a/src/zoom-c.c
b/src/zoom-c.c
index
948a1de
..
f6b2b27
100644
(file)
--- a/
src/zoom-c.c
+++ b/
src/zoom-c.c
@@
-1262,6
+1262,19
@@
ZOOM_API(size_t)
return r->num_facets;
}
+ZOOM_API(ZOOM_facet_field)
+ ZOOM_resultset_get_facet_field(ZOOM_resultset r, const char *name) {
+ int num = r->num_facets;
+ ZOOM_facet_field *facets = r->facets;
+ int index;
+ for (index = 0; index < num; index++) {
+ if (!strcmp(facets[index]->facet_name, name)) {
+ return facets[index];
+ }
+ }
+ return 0;
+}
+
ZOOM_API(ZOOM_facet_field *)
ZOOM_resultset_facets(ZOOM_resultset r)