From 68a15f332deef91d6ace9f07c98ffbe3cf4aa2aa Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Thu, 22 Jul 2010 17:12:23 +0200 Subject: [PATCH] Add missing facet function resultset_get_facet_field --- src/zoom-c.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/zoom-c.c b/src/zoom-c.c index 948a1de..f6b2b27 100644 --- 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) -- 1.7.10.4