From 301ebe26faf3818afe489ca21aefeabf1b238486 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Wed, 6 Jun 2012 12:07:34 +0200 Subject: [PATCH] Implement missing function. already declared in API --- src/zoom-c.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/zoom-c.c b/src/zoom-c.c index c1dc652..87a340d 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -1021,6 +1021,15 @@ ZOOM_API(ZOOM_facet_field) return 0; } +ZOOM_API(ZOOM_facet_field) + ZOOM_resultset_get_facet_by_index(ZOOM_resultset r, int index) { + int num = r->num_facets; + ZOOM_facet_field *facets = r->facets; + if (index >= 0 && index < num) { + return facets[index]; + } + return 0; +} ZOOM_API(ZOOM_facet_field *) ZOOM_resultset_facets(ZOOM_resultset r) -- 1.7.10.4