-/* $Id: extract.c,v 1.205 2006-03-25 21:18:09 adam Exp $
+/* $Id: extract.c,v 1.206 2006-03-30 09:52:15 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
ord = key.mem[0];
zebraExplain_lookup_ord(zh->reg->zei, ord, &index_type,
- 0/* db */, 0/* set */, 0/* use */);
+ 0/* db */, 0/* set */, 0/* use */,
+ 0 /* string index */);
assert(index_type);
zebra_term_untrans_iconv(zh, nmem, index_type,
&dst_term, str);
assert(key.len <= 4 && key.len > 2);
zebraExplain_lookup_ord(zh->reg->zei,
- key.mem[0], &index_type, &db, 0, 0);
+ key.mem[0], &index_type, &db, 0, 0, 0);
seqno = (int) key.mem[key.len-1];
-/* $Id: invstat.c,v 1.47 2006-02-20 12:41:42 adam Exp $
+/* $Id: invstat.c,v 1.48 2006-03-30 09:52:15 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
*dst = '\0';
else
{
- zebraExplain_lookup_ord (zh->reg->zei, ord, &index_type, &db, 0, 0);
+ zebraExplain_lookup_ord (zh->reg->zei, ord, &index_type, &db, 0, 0, 0);
zebra_term_untrans(zh, index_type, dst, s + len);
}
-/* $Id: kinput.c,v 1.70 2006-02-20 18:40:23 adam Exp $
+/* $Id: kinput.c,v 1.71 2006-03-30 09:52:15 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
else
{
zebraExplain_lookup_ord (zh->reg->zei,
- ord, &index_type, &db, 0, 0);
+ ord, &index_type, &db, 0, 0, 0);
zebra_term_untrans(zh, index_type, dst, s + len);
-/* $Id: rankstatic.c,v 1.3 2005-08-19 11:04:23 adam Exp $
+/* $Id: rankstatic.c,v 1.4 2006-03-30 09:52:15 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
si->no_rank_entries = 0;
for (i = 0; i < numterms; i++)
{
+ struct ord_list *ol = terms[i]->ol;
+
yaz_log(log_level, "i=%d flags=%s '%s'", i,
terms[i]->flags, terms[i]->name );
+
+ for (; ol; ol = ol->next)
+ {
+ int index_type = 0;
+ const char *db = 0;
+ const char *string_index = 0;
+ int set = -1;
+ int use = -1;
+
+ zebraExplain_lookup_ord(reg->zei,
+ ol->ord, &index_type, &db, &set, &use,
+ &string_index);
+
+ if (string_index)
+ yaz_log(log_level, " ord=%d index_type=%c db=%s str-index=%s",
+ ol->ord, index_type, db, string_index);
+ else
+ yaz_log(log_level, " ord=%d index_type=%c db=%s set=%d use=%d",
+ ol->ord, index_type, db, set, use);
+ }
if (!strncmp (terms[i]->flags, "rank,", 5))
(si->no_rank_entries)++;
}
-/* $Id: zinfo.c,v 1.56 2006-03-26 14:17:01 adam Exp $
+/* $Id: zinfo.c,v 1.57 2006-03-30 09:52:15 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
int zebraExplain_lookup_ord (ZebraExplainInfo zei, int ord,
int *index_type,
const char **db,
- int *set, int *use)
+ int *set, int *use,
+ const char **string_index)
{
struct zebDatabaseInfoB *zdb;
+
+ if (set)
+ *set = -1;
+ if (use)
+ *use = -1;
+ if (index_type)
+ *index_type = 0;
+ if (string_index)
+ *string_index = 0;
+
for (zdb = zei->databaseInfo; zdb; zdb = zdb->next)
{
struct zebSUInfoB *zsui;
if (use)
*use = zsui->info.u.su.use;
}
+
+ if (zsui->info.which == ZEB_SU_STR)
+ if (string_index)
+ *string_index = zsui->info.u.str;
+
if (index_type)
*index_type = zsui->info.index_type;
return 0;
-/* $Id: zinfo.h,v 1.28 2006-02-09 08:31:02 adam Exp $
+/* $Id: zinfo.h,v 1.29 2006-03-30 09:52:15 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
int zebraExplain_lookup_ord (ZebraExplainInfo zei, int ord,
int *index_type, const char **db,
- int *set, int *use);
+ int *set, int *use, const char **string_index);
int zebraExplain_trav_ord(ZebraExplainInfo zei, void *handle,
int (*f)(void *handle, int ord));
-/* $Id: zrpn.c,v 1.209 2006-02-20 12:38:42 adam Exp $
+/* $Id: zrpn.c,v 1.210 2006-03-30 09:52:16 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
zebra_term_untrans (p->zh, p->reg_type, term_tmp, name+len+1);
yaz_log(log_level_rpn, "grep: %d %c %s", ord, name[len], term_tmp);
zebraExplain_lookup_ord (p->zh->reg->zei,
- ord, 0 /* index_type */, &db, &set, &use);
+ ord, 0 /* index_type */, &db, &set, &use, 0);
yaz_log(log_level_rpn, "grep: set=%d use=%d db=%s", set, use, db);
resultSetAddTerm(p->zh, p->termset, name[len], db,