projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Disable limit debugging
[idzebra-moved-to-github.git]
/
index
/
zsets.c
diff --git
a/index/zsets.c
b/index/zsets.c
index
ed60386
..
949ace4
100644
(file)
--- a/
index/zsets.c
+++ b/
index/zsets.c
@@
-1,4
+1,4
@@
-/* $Id: zsets.c,v 1.93 2005-08-19 09:21:34 adam Exp $
+/* $Id: zsets.c,v 1.96 2005-10-28 07:25:30 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
Copyright (C) 1995-2005
Index Data ApS
@@
-872,6
+872,7
@@
ZEBRA_RES resultSetRank(ZebraHandle zh, ZebraSet zebraSet,
terms, numTerms);
zint psysno = 0; /* previous doc id / sys no */
zint pstaticrank = 0; /* previous static rank */
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];
while (rset_read(rfd, &key, &termid))
{
zint this_sys = key.mem[sysno_mem_index];
@@
-886,10
+887,13
@@
ZEBRA_RES resultSetRank(ZebraHandle zh, ZebraSet zebraSet,
break;
if (psysno)
{ /* only if we did have a previous record */
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++;
/* insert the hit. A=Ascending */
resultSetInsertRank (zh, sort_info, psysno, score, 'A');
count++;
+ if (stop_flag)
+ break;
}
psysno = this_sys;
if (zh->m_staticrank)
}
psysno = this_sys;
if (zh->m_staticrank)
@@
-900,7
+904,7
@@
ZEBRA_RES resultSetRank(ZebraHandle zh, ZebraSet zebraSet,
/* no more items */
if (psysno)
{ /* we had - at least - one record */
/* 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++;
/* insert the hit. A=Ascending */
resultSetInsertRank(zh, sort_info, psysno, score, 'A');
count++;
@@
-1068,7
+1072,7
@@
ZEBRA_RES zebra_snippets_hit_vector(ZebraHandle zh, const char *setname,
zint sysno, zebra_snippets *snippets)
{
ZebraSet sset = resultSetGet(zh, setname);
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;
setname, sysno);
if (!sset)
return ZEBRA_FAIL;
@@
-1107,7
+1111,6
@@
ZEBRA_RES zebra_snippets_hit_vector(ZebraHandle zh, const char *setname,
for (ol = termid->ol; ol; ol = ol->next)
{
zebra_snippets_append(snippets, key.mem[key.len-1],
for (ol = termid->ol; ol; ol = ol->next)
{
zebra_snippets_append(snippets, key.mem[key.len-1],
- termid->reg_type,
ol->ord, termid->name);
}
}
ol->ord, termid->name);
}
}
@@
-1116,6
+1119,7
@@
ZEBRA_RES zebra_snippets_hit_vector(ZebraHandle zh, const char *setname,
rset_delete(rset_comb);
nmem_destroy(nmem);
rset_delete(rset_comb);
nmem_destroy(nmem);
+ kc->dec(kc);
}
return ZEBRA_OK;
}
}
return ZEBRA_OK;
}