X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=index%2Fzinfo.c;h=e13b8c35985a25c66ea360c6664c9359f7824067;hb=11de0965b256736f01e55b17a603eb9ebad5ec12;hp=fc355db4f0497a6a20c9b8697b1838bbb4d04c0a;hpb=c093259af1129171ffb244fe10f5110d7463d88d;p=idzebra-moved-to-github.git diff --git a/index/zinfo.c b/index/zinfo.c index fc355db..e13b8c3 100644 --- a/index/zinfo.c +++ b/index/zinfo.c @@ -1,4 +1,4 @@ -/* $Id: zinfo.c,v 1.47 2005-08-05 10:40:13 adam Exp $ +/* $Id: zinfo.c,v 1.50 2005-08-26 10:13:31 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -373,7 +373,7 @@ ZebraExplainInfo zebraExplain_open ( 0, 0, 0, 0, 0, 0); } zdip = &zei->databaseInfo; - trec = rec_get (records, 1); /* get "root" record */ + trec = rec_get_root(records); /* get "root" record */ zei->ordinalSU = 1; zei->runNumber = 0; @@ -1309,7 +1309,7 @@ static void zebraExplain_writeTarget (ZebraExplainInfo zei, int key_flush) return; zei->dirty = 0; - trec = rec_get (zei->records, 1); + trec = rec_get_root(zei->records); xfree (trec->info[recInfo_storeData]); node_tgtinfo = data1_search_tag (zei->dh, zei->data1_target, @@ -1416,7 +1416,9 @@ int zebraExplain_trav_ord(ZebraExplainInfo zei, void *handle, } int zebraExplain_lookup_ord (ZebraExplainInfo zei, int ord, - const char **db, int *set, int *use) + int *index_type, + const char **db, + int *set, int *use) { struct zebDatabaseInfoB *zdb; for (zdb = zei->databaseInfo; zdb; zdb = zdb->next) @@ -1426,9 +1428,14 @@ int zebraExplain_lookup_ord (ZebraExplainInfo zei, int ord, if (zsui->info.which == ZEB_SU_SET_USE && zsui->info.ordinal == ord) { - *db = zdb->databaseName; - *set = zsui->info.u.su.set; - *use = zsui->info.u.su.use; + if (db) + *db = zdb->databaseName; + if (set) + *set = zsui->info.u.su.set; + if (use) + *use = zsui->info.u.su.use; + if (index_type) + *index_type = zsui->info.index_type; return 0; } } @@ -1562,6 +1569,7 @@ RecordAttr *rec_init_attr (ZebraExplainInfo zei, Record rec) recordAttr->recordSize = 0; recordAttr->recordOffset = 0; recordAttr->runNumber = zei->runNumber; + recordAttr->staticrank = 0; return recordAttr; }