From: Adam Dickmeiss Date: Mon, 13 Apr 2015 07:35:45 +0000 (+0200) Subject: sru_z3950: allow CCL in SRU search MP-606 X-Git-Tag: v1.8.8~1 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=973e85e353f85f6ad792f6e8a5bc5a4d75fb7da6;p=metaproxy-moved-to-github.git sru_z3950: allow CCL in SRU search MP-606 Makes the sru_z3950 filter convert to CCL queries if query type "ccl" is used, eg ?query=water&queryType=ccl&... for SRU 2.0. --- diff --git a/src/filter_sru_to_z3950.cpp b/src/filter_sru_to_z3950.cpp index 262b936..51e14fe 100644 --- a/src/filter_sru_to_z3950.cpp +++ b/src/filter_sru_to_z3950.cpp @@ -923,6 +923,15 @@ int yf::SRUtoZ3950::Impl::z3950_build_query( return 0; } + + if (!strcmp(req->queryType, "ccl")) + { + z_query->which = Z_Query_type_2; + z_query->u.type_2 = odr_create_Odr_oct(odr_en, req->query, + strlen(req->query)); + return 0; + } + return YAZ_SRW_MANDATORY_PARAMETER_NOT_SUPPLIED; }