ZOOM/yaz-client: request facets in additionalSearchInfo
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 19 Sep 2013 19:00:42 +0000 (21:00 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 19 Sep 2013 19:00:42 +0000 (21:00 +0200)
rather than otherInformation

client/client.c
src/zoom-z3950.c

index 56178da..b6c720e 100644 (file)
@@ -253,9 +253,12 @@ static void add_otherInfos(Z_APDU *a)
     Z_OtherInformation **oi;
     int i;
 
-    yaz_oi_APDU(a, &oi);
-    if (facet_list)
+    if (facet_list && a->which == Z_APDU_searchRequest)
+    {
+        oi = &a->u.searchRequest->additionalSearchInfo;
         yaz_oi_set_facetlist(oi, out, facet_list);
+    }
+    yaz_oi_APDU(a, &oi);
     for (i = 0; i < maxOtherInfosSupported; ++i)
     {
         if (oid_oidlen(extraOtherInfos[i].oid) > 0)
index fe86050..69d6dbe 100644 (file)
@@ -670,8 +670,7 @@ zoom_ret ZOOM_connection_Z3950_send_search(ZOOM_connection c)
     if (facets) {
         Z_FacetList *facet_list = yaz_pqf_parse_facet_list(c->odr_out, facets);
         if (facet_list) {
-            Z_OtherInformation **oi;
-            yaz_oi_APDU(apdu, &oi);
+            Z_OtherInformation **oi = &search_req->additionalSearchInfo;
             yaz_oi_set_facetlist(oi, c->odr_out, facet_list);
         }
         else