X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzebraapi.c;h=0cf60f36d6aa472e9e93b1d9a316647414324b19;hb=764b78fb481cf1084a5a583ffefbe8a0f32af28c;hp=ecc2b32beab24c50de6422ded6a2210e3f816ae5;hpb=8ec67e89869d6ab86fcdf35563f3f7ebfe02947a;p=idzebra-moved-to-github.git diff --git a/index/zebraapi.c b/index/zebraapi.c index ecc2b32..0cf60f3 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2002, Index Data * All rights reserved. * - * $Id: zebraapi.c,v 1.56 2002-04-15 14:05:43 adam Exp $ + * $Id: zebraapi.c,v 1.57 2002-04-16 22:31:42 adam Exp $ */ #include @@ -187,6 +187,7 @@ struct zebra_register *zebra_register_open (ZebraService zs, const char *name, reg->isam = 0; reg->isamc = 0; reg->isamd = 0; + reg->isamb = 0; reg->zei = 0; reg->matchDict = 0; @@ -227,7 +228,7 @@ struct zebra_register *zebra_register_open (ZebraService zs, const char *name, return 0; } } - else if (res_get_match (res, "isam", "i", ISAM_DEFAULT)) + if (res_get_match (res, "isam", "i", ISAM_DEFAULT)) { if (!(reg->isam = is_open (reg->bfs, FNAME_ISAM, key_compare, rw, sizeof (struct it_key), res))) @@ -236,7 +237,7 @@ struct zebra_register *zebra_register_open (ZebraService zs, const char *name, return 0; } } - else if (res_get_match (res, "isam", "c", ISAM_DEFAULT)) + if (res_get_match (res, "isam", "c", ISAM_DEFAULT)) { struct ISAMC_M_s isamc_m; if (!(reg->isamc = isc_open (reg->bfs, FNAME_ISAMC, @@ -246,7 +247,7 @@ struct zebra_register *zebra_register_open (ZebraService zs, const char *name, return 0; } } - else if (res_get_match (res, "isam", "d", ISAM_DEFAULT)) + if (res_get_match (res, "isam", "d", ISAM_DEFAULT)) { struct ISAMD_M_s isamd_m; @@ -257,6 +258,17 @@ struct zebra_register *zebra_register_open (ZebraService zs, const char *name, return 0; } } + if (res_get_match (res, "isam", "b", ISAM_DEFAULT)) + { + struct ISAMC_M_s isamc_m; + + if (!(reg->isamb = isamb_open (reg->bfs, "isamb", + rw, key_isamc_m(res, &isamc_m)))) + { + logf (LOG_WARN, "isamb_open"); + return 0; + } + } reg->zei = zebraExplain_open (reg->records, reg->dh, res, rw, reg, explain_extract); @@ -305,6 +317,8 @@ static void zebra_register_close (ZebraService zs, struct zebra_register *reg) isc_close (reg->isamc); if (reg->isamd) isamd_close (reg->isamd); + if (reg->isamb) + isamb_close (reg->isamb); rec_close (®->records); }