-/* $Id: zebraapi.c,v 1.232 2006-11-17 13:47:22 marc Exp $
+/* $Id: zebraapi.c,v 1.234 2006-11-21 22:17:49 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
ZEBRA_CHECK_HANDLE(zh);
yaz_log(log_level, "zebra_flush_reg");
zebraExplain_flush (zh->reg->zei, zh);
-
- extract_flushWriteKeys (zh, 1 /* final */);
- zebra_index_merge (zh );
+
+ key_block_flush(zh->reg->key_block, 1);
+
+ zebra_index_merge(zh);
return ZEBRA_OK;
}
}
reg->rank_classes = NULL;
- reg->key_buf = 0;
-
+ reg->key_block = 0;
reg->keys = zebra_rec_keys_open();
reg->sortKeys = zebra_rec_keys_open();
reg->isamc = 0;
reg->isamb = 0;
reg->zei = 0;
- reg->key_file_no = 0;
- reg->ptr_i = 0;
/* installing rank classes */
zebraRankInstall (reg, rank_1_class);
zebra_rec_keys_close(reg->keys);
zebra_rec_keys_close(reg->sortKeys);
- xfree(reg->key_buf);
+ key_block_destroy(®->key_block);
xfree(reg->name);
xfree(reg);
}
ZEBRA_RES zebra_admin_import_segment (ZebraHandle zh, Z_Segment *segment)
{
ZEBRA_RES res = ZEBRA_OK;
- SYSNO sysno;
+ zint sysno;
int i;
ZEBRA_CHECK_HANDLE(zh);
yaz_log(log_level, "zebra_admin_import_segment");
/* 4 = update. Insert/replace */
{
ZEBRA_RES res;
- SYSNO sysno = 0;
+ zint sysno = 0;
char *rinfo = 0;
char recid_z[256];
int db_ord;
ZEBRA_RES zebra_insert_record(ZebraHandle zh,
const char *recordType,
- SYSNO *sysno, const char *match,
+ zint *sysno, const char *match,
const char *fname,
const char *buf, int buf_size, int force_update)
{
return res;
}
-ZEBRA_RES zebra_update_record (ZebraHandle zh,
- const char *recordType,
- SYSNO* sysno, const char *match,
- const char *fname,
- const char *buf, int buf_size,
- int force_update)
+ZEBRA_RES zebra_update_record(ZebraHandle zh,
+ const char *recordType,
+ zint *sysno, const char *match,
+ const char *fname,
+ const char *buf, int buf_size,
+ int force_update)
{
ZEBRA_RES res;
return res;
}
-ZEBRA_RES zebra_delete_record (ZebraHandle zh,
- const char *recordType,
- SYSNO *sysno, const char *match,
- const char *fname,
- const char *buf, int buf_size,
- int force_update)
+ZEBRA_RES zebra_delete_record(ZebraHandle zh,
+ const char *recordType,
+ zint *sysno, const char *match,
+ const char *fname,
+ const char *buf, int buf_size,
+ int force_update)
{
ZEBRA_RES res;
zh->errString = nmem_strdup(zh->nmem_error, vstr);
}
-void zebra_lock_prefix (Res res, char *path)
+void zebra_lock_prefix(Res res, char *path)
{
const char *lock_dir = res_get_def (res, "lockDir", "");
-
- strcpy (path, lock_dir);
+
+ strcpy(path, lock_dir);
if (*path && path[strlen(path)-1] != '/')
strcat (path, "/");
}