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
Use zint for numbers in update statistics.
[idzebra-moved-to-github.git]
/
index
/
zebraapi.c
diff --git
a/index/zebraapi.c
b/index/zebraapi.c
index
d8857c1
..
7b14661
100644
(file)
--- a/
index/zebraapi.c
+++ b/
index/zebraapi.c
@@
-1,4
+1,4
@@
-/* $Id: zebraapi.c,v 1.234 2006-11-21 22:17:49 adam Exp $
+/* $Id: zebraapi.c,v 1.237 2006-12-05 14:06:29 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-174,12
+174,12
@@
ZebraHandle zebra_open(ZebraService zs, Res res)
return zh;
}
return zh;
}
-ZebraService zebra_start (const char *configName)
+ZebraService zebra_start(const char *configName)
{
return zebra_start_res(configName, 0, 0);
}
{
return zebra_start_res(configName, 0, 0);
}
-ZebraService zebra_start_res (const char *configName, Res def_res, Res over_res)
+ZebraService zebra_start_res(const char *configName, Res def_res, Res over_res)
{
Res res;
{
Res res;
@@
-209,7
+209,18
@@
ZebraService zebra_start_res (const char *configName, Res def_res, Res over_res)
res_close(res);
return 0;
}
res_close(res);
return 0;
}
+ if (zebra_check_res(res))
+ {
+ yaz_log(YLOG_FATAL, "Configuration error(s) for %s",
+ configName);
+ return 0;
+ }
}
}
+ else
+ {
+ zebra_check_res(res);
+ }
+
zh = xmalloc(sizeof(*zh));
zh->global_res = res;
zh->sessions = 0;
zh = xmalloc(sizeof(*zh));
zh->global_res = res;
zh->sessions = 0;
@@
-348,8
+359,7
@@
struct zebra_register *zebra_register_open(ZebraService zs, const char *name,
}
getcwd(cwd, sizeof(cwd)-1);
}
getcwd(cwd, sizeof(cwd)-1);
- profilePath = res_get_def(res, "profilePath", DEFAULT_PROFILE_PATH);
- yaz_log(YLOG_DEBUG, "profilePath=%s cwd=%s", profilePath, cwd);
+ profilePath = res_get_def(res, "profilePath", 0);
data1_set_tabpath (reg->dh, profilePath);
data1_set_tabroot (reg->dh, reg_path);
data1_set_tabpath (reg->dh, profilePath);
data1_set_tabroot (reg->dh, reg_path);
@@
-1066,9
+1076,12
@@
ZEBRA_RES zebra_records_retrieve(ZebraHandle zh, ODR stream,
int len = 0;
zebra_snippets *hit_snippet = zebra_snippets_create();
int len = 0;
zebra_snippets *hit_snippet = zebra_snippets_create();
+ /* we disable hit snippets for now. It does not work well
+ and it slows retrieval down a lot */
+#if 0
zebra_snippets_hit_vector(zh, setname, poset[i].sysno,
hit_snippet);
zebra_snippets_hit_vector(zh, setname, poset[i].sysno,
hit_snippet);
-
+#endif
recs[i].errCode =
zebra_record_fetch(zh, poset[i].sysno, poset[i].score,
hit_snippet,
recs[i].errCode =
zebra_record_fetch(zh, poset[i].sysno, poset[i].score,
hit_snippet,