-/* $Id: kcompare.c,v 1.56 2005-04-13 13:03:47 adam Exp $
+/* $Id: kcompare.c,v 1.57 2005-05-31 07:29:10 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
#define CODEC_INLINE
#endif
-void key_logdump_txt (int logmask, const void *p, const char *txt)
+void key_logdump_txt(int logmask, const void *p, const char *txt)
{
struct it_key key;
+ if (!txt)
+ txt = "(none)";
if (p)
{
char formstr[128];
strcat(formstr, ".");
sprintf(formstr + strlen(formstr), ZINT_FORMAT, key.mem[i]);
}
- yaz_log (logmask, "%s %s", formstr, txt);
+ yaz_log(logmask, "%s %s", formstr, txt);
}
else
- yaz_log(logmask, " (null) %s",txt);
+ yaz_log(logmask, " (no key) %s",txt);
}
-void key_logdump (int logmask, const void *p)
+void key_logdump(int logmask, const void *p)
{
key_logdump_txt(logmask, p, "");
}
-/* $Id: zsets.c,v 1.83 2005-05-24 11:35:42 adam Exp $
+/* $Id: zsets.c,v 1.84 2005-05-31 07:29:10 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
}
}
rfd = rset_open (rset, RSETF_READ);
- /* FIXME - pass a TERMID *, and use it for something below !! */
while (rset_read (rfd, &key, &termid))
{
zint this_sys = key.mem[0];
+ if (log_level_searchhits)
+ key_logdump_txt(log_level_searchhits, &key, termid->name);
kno++;
if (this_sys != psysno)
{
zint this_sys = key.mem[0];
zint seqno = key.mem[key.len-1];
kno++;
- key_logdump_txt(log_level_searchhits, &key, " Got hit");
+ if (log_level_searchhits)
+ key_logdump_txt(log_level_searchhits, &key, termid->name);
if (this_sys != psysno)
{
if (rfd->counted_items >= rset->hits_limit)