int index;
int freq = 100;
int length = strlen(facet_name) + 10;
- char key[length];
+ char *key = odr_malloc(odr, length);
key[0] = '\0';
for (index = 0; index < facet_field->num_terms; index++) {
Z_Term *term;
for (index = 0; index < facet_list->num; index++) {
struct yaz_facet_attr attrvalues;
- facet_struct_init(&attrvalues);
+ yaz_facet_attr_init(&attrvalues);
attrvalues.limit = 10;
- facetattrs(facet_list->elements[index]->attributes, &attrvalues);
+ yaz_facet_attr_get_z_attributes(facet_list->elements[index]->attributes,
+ &attrvalues);
yaz_log(YLOG_LOG, "Attributes: %s %d ", attrvalues.useattr, attrvalues.limit);
if (attrvalues.errstring)
yaz_log(YLOG_LOG, "Error parsing attributes: %s", attrvalues.errstring);
if (1)
{
- /* TODO Not general. Only handles one (Facet) OtherInformation. Overwrite */
- Z_FacetList *facet_list = extract_facet_request(rr->stream, rr->search_input);
-
+ Z_FacetList *facet_list = yaz_oi_get_facetlist(&rr->search_input);
if (facet_list) {
yaz_log(YLOG_LOG, "%d Facets in search request.", facet_list->num);
rr->search_info = build_facet_response(rr->stream, facet_list);