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
added more statistics to rank function, renamed variables to better names
[idzebra-moved-to-github.git]
/
index
/
zebraapi.c
diff --git
a/index/zebraapi.c
b/index/zebraapi.c
index
7c914b4
..
1b24783
100644
(file)
--- a/
index/zebraapi.c
+++ b/
index/zebraapi.c
@@
-1,4
+1,4
@@
-/* $Id: zebraapi.c,v 1.212 2006-04-05 02:10:20 adam Exp $
+/* $Id: zebraapi.c,v 1.215 2006-05-03 09:31:26 marc Exp $
Copyright (C) 1995-2005
Index Data ApS
Copyright (C) 1995-2005
Index Data ApS
@@
-36,6
+36,7
@@
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include <yaz/pquery.h>
#include <yaz/sortspec.h>
#include "index.h"
#include <yaz/pquery.h>
#include <yaz/sortspec.h>
#include "index.h"
+#include "rank.h"
#include "orddict.h"
#include <charmap.h>
#include <idzebra/api.h>
#include "orddict.h"
#include <charmap.h>
#include <idzebra/api.h>
@@
-377,8
+378,10
@@
struct zebra_register *zebra_register_open(ZebraService zs, const char *name,
reg->key_file_no = 0;
reg->ptr_i = 0;
reg->key_file_no = 0;
reg->ptr_i = 0;
+ /* installing rank classes */
zebraRankInstall (reg, rank_1_class);
zebraRankInstall (reg, rank_zv_class);
zebraRankInstall (reg, rank_1_class);
zebraRankInstall (reg, rank_zv_class);
+ zebraRankInstall (reg, rank_similarity_class);
zebraRankInstall (reg, rank_static_class);
recordCompression = res_get_def (res, "recordCompression", "none");
zebraRankInstall (reg, rank_static_class);
recordCompression = res_get_def (res, "recordCompression", "none");
@@
-1984,7
+1987,12
@@
static ZEBRA_RES zebra_commit_ex(ZebraHandle zh, int clean_only)
zebra_lock_r (zh->lock_shadow);
bfs = bfs_create (res_get (zh->res, "register"), zh->path_reg);
zebra_lock_r (zh->lock_shadow);
bfs = bfs_create (res_get (zh->res, "register"), zh->path_reg);
-
+ if (!bfs)
+ {
+ zebra_unlock(zh->lock_shadow);
+ zebra_unlock(zh->lock_normal);
+ return ZEBRA_FAIL;
+ }
zebra_get_state (zh, &val, &seqno);
if (rval && *rval)
zebra_get_state (zh, &val, &seqno);
if (rval && *rval)
@@
-2297,9
+2305,10
@@
ZEBRA_RES zebra_delete_record (ZebraHandle zh,
ZEBRA_CHECK_HANDLE(zh);
ZEBRA_CHECK_HANDLE(zh);
- assert(sysno);
assert(buf);
assert(buf);
- yaz_log(log_level, "zebra_delete_record sysno=" ZINT_FORMAT, *sysno);
+ yaz_log(log_level, "zebra_delete_record");
+ if (sysno)
+ yaz_log(log_level, " sysno=" ZINT_FORMAT, *sysno);
if (buf_size < 1) buf_size = strlen(buf);
if (buf_size < 1) buf_size = strlen(buf);