-/* $Id: zsets.c,v 1.93 2005-08-19 09:21:34 adam Exp $
+/* $Id: zsets.c,v 1.95 2005-08-26 10:13:31 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
terms, numTerms);
zint psysno = 0; /* previous doc id / sys no */
zint pstaticrank = 0; /* previous static rank */
+ int stop_flag = 0;
while (rset_read(rfd, &key, &termid))
{
zint this_sys = key.mem[sysno_mem_index];
break;
if (psysno)
{ /* only if we did have a previous record */
- score = (*rc->calc) (handle, psysno, pstaticrank);
+ score = (*rc->calc) (handle, psysno, pstaticrank,
+ &stop_flag);
/* insert the hit. A=Ascending */
resultSetInsertRank (zh, sort_info, psysno, score, 'A');
count++;
+ if (stop_flag)
+ break;
}
psysno = this_sys;
if (zh->m_staticrank)
/* no more items */
if (psysno)
{ /* we had - at least - one record */
- score = (*rc->calc)(handle, psysno, pstaticrank);
+ score = (*rc->calc)(handle, psysno, pstaticrank, &stop_flag);
/* insert the hit. A=Ascending */
resultSetInsertRank(zh, sort_info, psysno, score, 'A');
count++;
zint sysno, zebra_snippets *snippets)
{
ZebraSet sset = resultSetGet(zh, setname);
- yaz_log(YLOG_LOG, "zebra_get_hit_vector setname=%s zysno=" ZINT_FORMAT,
+ yaz_log(YLOG_DEBUG, "zebra_get_hit_vector setname=%s zysno=" ZINT_FORMAT,
setname, sysno);
if (!sset)
return ZEBRA_FAIL;
for (ol = termid->ol; ol; ol = ol->next)
{
zebra_snippets_append(snippets, key.mem[key.len-1],
- termid->reg_type,
ol->ord, termid->name);
}
}