#include <unistd.h>
#endif
#include <signal.h>
-#include <ctype.h>
#include <assert.h>
#include <yaz/marcdisp.h>
char *cqlquery; // used for SRU targets only
int hits;
int record_offset;
- int setno;
int diagnostic;
enum client_state state;
struct show_raw *show_raw;
"Client_Working",
"Client_Error",
"Client_Failed",
- "Client_Disconnected",
- "Client_Stopped",
- "Client_Continue"
+ "Client_Disconnected"
};
static struct client *client_freelist = 0;
if (cl->cqlquery)
{
+ yaz_log(YLOG_LOG, "Search %s CQL: %s", sdb->database->url, cl->cqlquery);
ZOOM_query q = ZOOM_query_create();
ZOOM_query_cql(q, cl->cqlquery);
rs = ZOOM_connection_search(link, q);
ZOOM_query_destroy(q);
}
else
+ {
+ yaz_log(YLOG_LOG, "Search %s PQF: %s", sdb->database->url, cl->pquery);
rs = ZOOM_connection_search_pqf(link, cl->pquery);
+ }
connection_set_resultset(co, rs);
connection_continue(co);
}
r->session = 0;
r->hits = 0;
r->record_offset = 0;
- r->setno = 0;
r->diagnostic = 0;
r->state = Client_Disconnected;
r->show_raw = 0;
int cerror, cpos;
CCL_bibset ccl_map = prepare_cclmap(cl);
const char *sru = session_setting_oneval(sdb, PZ_SRU);
+ const char *pqf_prefix = session_setting_oneval(sdb, PZ_PQF_PREFIX);
if (!ccl_map)
return -1;
return -1;
}
wrbuf_rewind(se->wrbuf);
+ if (*pqf_prefix)
+ {
+ wrbuf_puts(se->wrbuf, pqf_prefix);
+ wrbuf_puts(se->wrbuf, " ");
+ }
ccl_pquery(se->wrbuf, cn);
xfree(cl->pquery);
cl->pquery = xstrdup(wrbuf_cstr(se->wrbuf));
int client_is_active(struct client *cl)
{
- if (cl->connection && (cl->state == Client_Continue ||
- cl->state == Client_Connecting ||
+ if (cl->connection && (cl->state == Client_Connecting ||
cl->state == Client_Working))
return 1;
return 0;