#include <yaz/pquery.h>
#include <yaz/oid_db.h>
#include <yaz/log.h>
+#if YAZ_VERSIONL >= 0x50000
+#include <yaz/facet.h>
+#endif
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition.hpp>
odr_malloc(odr_en, sizeof(char *));
z_searchRequest->databaseNames[0] = odr_strdup(odr_en, db.c_str());
}
+#if YAZ_VERSIONL >= 0x50000
+ // yaz_oi_set_facetlist not public in YAZ 4.2.66
+ if (sr_req->facetList)
+ {
+ Z_OtherInformation **oi = &z_searchRequest->otherInfo;
+ yaz_oi_set_facetlist(oi, odr_en, sr_req->facetList);
+ }
+#endif
Z_Query *z_query = (Z_Query *) odr_malloc(odr_en, sizeof(Z_Query));
z_searchRequest->query = z_query;
{
return false;
}
-
+#if YAZ_VERSIONL >= 0x50000
+ Z_FacetList *fl = yaz_oi_get_facetlist(&sr->additionalSearchInfo);
+ if (!fl)
+ fl = yaz_oi_get_facetlist(&sr->otherInfo);
+ sru_pdu_res->u.response->facetList = fl;
+#endif
sru_pdu_res->u.response->numberOfRecords
= odr_intdup(odr_en, *sr->resultCount);
return true;