X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzebraapi.c;h=c40bce87a2df3fd81c3fb6cf10d776cb2b1ba824;hb=3042550d9340f8f9e3058702240e2cd376aa33fa;hp=320d375ee362ff7546c7b20118e7f96818f58c08;hpb=b8bc024e463e9498e6db70d36fc93dcc5673ba50;p=idzebra-moved-to-github.git diff --git a/index/zebraapi.c b/index/zebraapi.c index 320d375..c40bce8 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1,4 +1,4 @@ -/* $Id: zebraapi.c,v 1.213 2006-04-05 02:52:11 adam Exp $ +/* $Id: zebraapi.c,v 1.217 2006-05-10 08:13:23 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -36,6 +36,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include "index.h" +#include "rank.h" #include "orddict.h" #include #include @@ -245,6 +246,14 @@ ZebraService zebra_start_res (const char *configName, Res def_res, Res over_res) zh->path_root = res_get (zh->global_res, "root"); zh->nmem = nmem_create(); zh->record_classes = recTypeClass_create (zh->global_res, zh->nmem); + + if (1) + { + const char *module_path = res_get(res, "modulePath"); + if (module_path) + recTypeClass_load_modules(&zh->record_classes, zh->nmem, + module_path); + } return zh; } return 0; @@ -377,8 +386,10 @@ struct zebra_register *zebra_register_open(ZebraService zs, const char *name, 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_similarity_class); zebraRankInstall (reg, rank_static_class); recordCompression = res_get_def (res, "recordCompression", "none"); @@ -2302,9 +2313,10 @@ ZEBRA_RES zebra_delete_record (ZebraHandle zh, ZEBRA_CHECK_HANDLE(zh); - assert(sysno); 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); @@ -2461,3 +2473,11 @@ void zebra_lock_prefix (Res res, char *path) strcat (path, "/"); } +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +