X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzebrasrv.c;h=3a6016facc405711b30ee882e2268a0572920404;hb=e6934fa1456854ea104c3729a5f27dd487693d56;hp=7ef4cd2c5717a44fbe46def0c470980354d32535;hpb=dedcb702edbaed5026f1f98964ca68edcfd3cfc2;p=idzebra-moved-to-github.git diff --git a/index/zebrasrv.c b/index/zebrasrv.c index 7ef4cd2..3a6016f 100644 --- a/index/zebrasrv.c +++ b/index/zebrasrv.c @@ -37,6 +37,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include +#include #include #include #include @@ -274,6 +275,7 @@ static int break_handler(void *client_data) static Z_RPNQuery *query_add_sortkeys(ODR o, Z_RPNQuery *query, const char *sortKeys) { +#if YAZ_VERSIONL >= 0x40200 /* sortkey layour: path,schema,ascending,caseSensitive,missingValue */ /* see cql_sortby_to_sortkeys of YAZ. */ char **sortspec; @@ -335,6 +337,12 @@ static Z_RPNQuery *query_add_sortkeys(ODR o, Z_RPNQuery *query, } wrbuf_destroy(w); } +#else + if (sortKeys) + { + yaz_log(YLOG_WARN, "sortkeys ignored because YAZ version < 4.2.0"); + } +#endif return query; }