Implement missing function. already declared in API
authorDennis Schafroth <dennis@indexdata.com>
Wed, 6 Jun 2012 10:07:34 +0000 (12:07 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Wed, 6 Jun 2012 10:07:34 +0000 (12:07 +0200)
src/zoom-c.c

index c1dc652..87a340d 100644 (file)
@@ -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)