projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Staticrank indexing is now an index register type defined in default.idx
[idzebra-moved-to-github.git]
/
index
/
zebrasrv.c
diff --git
a/index/zebrasrv.c
b/index/zebrasrv.c
index
966c186
..
6ecbecf
100644
(file)
--- a/
index/zebrasrv.c
+++ b/
index/zebrasrv.c
@@
-1,5
+1,5
@@
-/* $Id: zebrasrv.c,v 1.2 2006-11-21 22:17:49 adam Exp $
- Copyright (C) 1995-2006
+/* $Id: zebrasrv.c,v 1.9 2007-01-17 15:35:48 adam Exp $
+ Copyright (C) 1995-2007
Index Data ApS
This file is part of the Zebra server.
Index Data ApS
This file is part of the Zebra server.
@@
-261,6
+261,15
@@
static void search_terms(ZebraHandle zh, bend_search_rr *r)
}
}
}
}
+
+static int break_handler(void *client_data)
+{
+ bend_association assoc =(bend_association) client_data;
+ if (!bend_assoc_is_alive(assoc))
+ return 1;
+ return 0;
+}
+
int bend_search(void *handle, bend_search_rr *r)
{
ZebraHandle zh = (ZebraHandle) handle;
int bend_search(void *handle, bend_search_rr *r)
{
ZebraHandle zh = (ZebraHandle) handle;
@@
-274,12
+283,15
@@
int bend_search(void *handle, bend_search_rr *r)
zebra_result (zh, &r->errcode, &r->errstring);
return 0;
}
zebra_result (zh, &r->errcode, &r->errstring);
return 0;
}
+ zebra_set_break_handler(zh, break_handler, r->association);
yaz_log (YLOG_DEBUG, "ResultSet '%s'", r->setname);
switch (r->query->which)
{
case Z_Query_type_1: case Z_Query_type_101:
yaz_log (YLOG_DEBUG, "ResultSet '%s'", r->setname);
switch (r->query->which)
{
case Z_Query_type_1: case Z_Query_type_101:
- res = zebra_search_RPN(zh, r->stream, r->query->u.type_1,
- r->setname, &zhits);
+ res = zebra_search_RPN_x(zh, r->stream, r->query->u.type_1,
+ r->setname, &zhits,
+ &r->estimated_hit_count,
+ &r->partial_resultset);
if (res != ZEBRA_OK)
zebra_result(zh, &r->errcode, &r->errstring);
else
if (res != ZEBRA_OK)
zebra_result(zh, &r->errcode, &r->errstring);
else
@@
-297,6
+309,7
@@
int bend_search(void *handle, bend_search_rr *r)
default:
r->errcode = YAZ_BIB1_QUERY_TYPE_UNSUPP;
}
default:
r->errcode = YAZ_BIB1_QUERY_TYPE_UNSUPP;
}
+ zebra_set_break_handler(zh, 0, 0);
return 0;
}
return 0;
}
@@
-630,7
+643,8
@@
int bend_esrequest (void *handle, bend_esrequest_rr *rr)
rec->u.octet_aligned->len,
rec->u.octet_aligned->buf);
}
rec->u.octet_aligned->len,
rec->u.octet_aligned->buf);
}
- if (oident && oident->value != VAL_TEXT_XML)
+ if (oident && oident->value != VAL_TEXT_XML
+ && oident->value != VAL_SUTRS)
{
rr->errcode = YAZ_BIB1_ES_IMMEDIATE_EXECUTION_FAILED;
rr->errstring = "only XML update supported";
{
rr->errcode = YAZ_BIB1_ES_IMMEDIATE_EXECUTION_FAILED;
rr->errstring = "only XML update supported";
@@
-756,9
+770,14
@@
int bend_esrequest (void *handle, bend_esrequest_rr *rr)
static void bend_start (struct statserv_options_block *sob)
{
static void bend_start (struct statserv_options_block *sob)
{
+ Res default_res = res_open(0, 0);
+
if (sob->handle)
zebra_stop((ZebraService) sob->handle);
if (sob->handle)
zebra_stop((ZebraService) sob->handle);
+ res_set(default_res, "profilePath", DEFAULT_PROFILE_PATH);
+ res_set(default_res, "modulePath", DEFAULT_MODULE_PATH);
sob->handle = zebra_start(sob->configname);
sob->handle = zebra_start(sob->configname);
+ res_close(default_res);
if (!sob->handle)
{
yaz_log (YLOG_FATAL, "Failed to read config `%s'", sob->configname);
if (!sob->handle)
{
yaz_log (YLOG_FATAL, "Failed to read config `%s'", sob->configname);