From: Dennis Schafroth Date: Thu, 22 Jul 2010 15:12:23 +0000 (+0200) Subject: Add missing facet function resultset_get_facet_field X-Git-Tag: v4.0.12~25 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=68a15f332deef91d6ace9f07c98ffbe3cf4aa2aa;p=yaz-moved-to-github.git Add missing facet function resultset_get_facet_field --- 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)