- uint32_t flags = 0;
- memcached_return_t rc;
- time_t expiration = 36000;
- char str[40];
-
- sprintf(str, ODR_INT_PRINTF, resultset->size);
- rc = memcached_set(c->mc_st,
- wrbuf_buf(resultset->mc_key),wrbuf_len(resultset->mc_key),
- str, strlen(str), expiration, flags);
- yaz_log(YLOG_LOG, "Store SRU hit count key=%s value=%s rc=%u %s",
- wrbuf_cstr(resultset->mc_key), str, (unsigned) rc,
- memcached_last_error_message(c->mc_st));
+ ODR o = c->odr_in;
+ Z_External *ext = (Z_External *)
+ odr_malloc(o, sizeof(*ext));
+
+ ext->which = Z_External_userFacets;
+ ext->u.facetList = res->facetList;
+ ext->direct_reference =
+ odr_oiddup(o, yaz_oid_userinfo_facet_1);
+ ext->indirect_reference = 0;
+ ext->descriptor = 0;
+ oi = (Z_OtherInformation *) odr_malloc(o, sizeof(*oi));
+ oi->num_elements = 1;
+ oi->list = (Z_OtherInformationUnit **)
+ odr_malloc(o, sizeof(*oi->list));
+ oi->list[0] = (Z_OtherInformationUnit *)
+ odr_malloc(o, sizeof(**oi->list));
+ oi->list[0]->category = 0;
+ oi->list[0]->which = Z_OtherInfo_externallyDefinedInfo;
+ oi->list[0]->information.externallyDefinedInfo = ext;