From 973e85e353f85f6ad792f6e8a5bc5a4d75fb7da6 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 13 Apr 2015 09:35:45 +0200 Subject: [PATCH] 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. --- src/filter_sru_to_z3950.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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; } -- 1.7.10.4