X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fseshigh.c;h=d357095a9386ba4bfe02792b43daff935278ec55;hp=07ee0144db6a69f7b503506832c36811f7d38caf;hb=4b72516157f967c0bf70e1ca1e61e89a6c7daa5e;hpb=47ceb84b5ac99c72bcaef53be93494541e9a68c0 diff --git a/src/seshigh.c b/src/seshigh.c index 07ee014..d357095 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -56,6 +56,7 @@ #include #endif +#include #include #include #include "eventl.h" @@ -1008,6 +1009,11 @@ static void srw_bend_search(association *assoc, rr.errstring = 0; rr.search_info = 0; rr.search_input = 0; + + if (srw_req->facetList) + yaz_oi_set_facetlist(&rr.search_input, assoc->encode, + srw_req->facetList); + yaz_log_zquery_level(log_requestdetail,rr.query); (assoc->init->bend_search)(assoc->backend, &rr); @@ -1046,6 +1052,7 @@ static void srw_bend_search(association *assoc, odr_intdup(assoc->encode, *rr.srw_setnameIdleTime ); } + srw_res->facetList = yaz_oi_get_facetlist(&rr.search_info); if (start > rr.hits || start < 1) { /* if hits<=0 and start=1 we don't return a diagnostic */ @@ -2674,7 +2681,9 @@ static Z_APDU *process_searchRequest(association *assoc, request *reqb) bsrr->errcode = 0; bsrr->errstring = NULL; bsrr->search_info = NULL; - bsrr->search_input = req->otherInfo; + bsrr->search_input = req->additionalSearchInfo; + if (!bsrr->search_input) + bsrr->search_input = req->otherInfo; bsrr->present_number = *req->mediumSetPresentNumber; if (assoc->server && assoc->server->cql_transform @@ -3091,7 +3100,6 @@ static Z_APDU *process_scanRequest(association *assoc, request *reqb) { Z_Entry *e; Z_TermInfo *t; - Odr_oct *o; tab[i] = e = (Z_Entry *)odr_malloc(assoc->encode, sizeof(*e)); if (bsrr->entries[i].occurrences >= 0) @@ -3118,12 +3126,10 @@ static Z_APDU *process_scanRequest(association *assoc, request *reqb) t->term = (Z_Term *) odr_malloc(assoc->encode, sizeof(*t->term)); t->term->which = Z_Term_general; - t->term->u.general = o = - (Odr_oct *)odr_malloc(assoc->encode, sizeof(Odr_oct)); - o->buf = (unsigned char *) - odr_malloc(assoc->encode, o->len = o->size = - strlen(bsrr->entries[i].term)); - memcpy(o->buf, bsrr->entries[i].term, o->len); + t->term->u.general = + odr_create_Odr_oct(assoc->encode, + bsrr->entries[i].term, + strlen(bsrr->entries[i].term)); yaz_log(YLOG_DEBUG, " term #%d: '%s' (" ODR_INT_PRINTF ")", i, bsrr->entries[i].term, bsrr->entries[i].occurrences); }