From bdf06e5e1f64578dcd820e73d8e686f7a39942de Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Mon, 7 Mar 2011 15:44:27 +0100 Subject: [PATCH] New setting query syntax: override with special query syntax --- src/client.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/client.c b/src/client.c index e2a363c..a30355b 100644 --- a/src/client.c +++ b/src/client.c @@ -934,7 +934,7 @@ int client_parse_query(struct client *cl, const char *query) const char *sru = session_setting_oneval(sdb, PZ_SRU); const char *pqf_prefix = session_setting_oneval(sdb, PZ_PQF_PREFIX); const char *pqf_strftime = session_setting_oneval(sdb, PZ_PQF_STRFTIME); - + const char *query_syntax = session_setting_oneval(sdb, PZ_QUERY_SYNTAX); if (!ccl_map) return -1; @@ -978,7 +978,11 @@ int client_parse_query(struct client *cl, const char *query) cl->pquery = xstrdup(wrbuf_cstr(se->wrbuf)); xfree(cl->cqlquery); - if (*sru) + + /* Support for PQF on SRU targets. + * TODO Refactor */ + yaz_log(YLOG_DEBUG, "Query syntax: %s", query_syntax); + if (strcmp(query_syntax, "pqf") != 0 && *sru) { if (!strcmp(sru, "solr")) { if (!(cl->cqlquery = make_solrquery(cl))) -- 1.7.10.4