-/* $Id: zinfo.c,v 1.47 2005-08-05 10:40:13 adam Exp $
+/* $Id: zinfo.c,v 1.52 2005-12-08 11:10:03 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
yaz_log (YLOG_LOG, "zebraExplain_open wr=%d", writeFlag);
#endif
zei = (ZebraExplainInfo) nmem_malloc (nmem, sizeof(*zei));
+ zei->databaseInfo = 0;
zei->write_flag = writeFlag;
zei->updateHandle = updateHandle;
zei->updateFunc = updateFunc;
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;
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,
}
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)
{
struct zebSUInfoB *zsui = zdb->attributeDetails->SUInfo;
for ( ;zsui; zsui = zsui->next)
- if (zsui->info.which == ZEB_SU_SET_USE &&
- zsui->info.ordinal == ord)
+ if (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 (zsui->info.which == ZEB_SU_SET_USE)
+ {
+ 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;
}
}
recordAttr->recordSize = 0;
recordAttr->recordOffset = 0;
recordAttr->runNumber = zei->runNumber;
+ recordAttr->staticrank = 0;
return recordAttr;
}