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
Tokenize for index_type system.
[idzebra-moved-to-github.git]
/
index
/
rpnscan.c
diff --git
a/index/rpnscan.c
b/index/rpnscan.c
index
4fbb8a5
..
d484132
100644
(file)
--- a/
index/rpnscan.c
+++ b/
index/rpnscan.c
@@
-1,4
+1,4
@@
-/* $Id: rpnscan.c,v 1.12 2007-08-21 13:27:04 adam Exp $
+/* $Id: rpnscan.c,v 1.13 2007-09-18 18:57:29 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
Copyright (C) 1995-2007
Index Data ApS
@@
-106,12
+106,17
@@
static void count_set(ZebraHandle zh, RSET rset, zint *count)
*count = rset->hits_count;
}
*count = rset->hits_count;
}
-static void get_first_snippet_from_rset(RSET rset, zebra_snippets *snippets,
+static void get_first_snippet_from_rset(ZebraHandle zh,
+ RSET rset, zebra_snippets *snippets,
zint *sysno)
{
struct it_key key;
RSFD rfd;
TERMID termid;
zint *sysno)
{
struct it_key key;
RSFD rfd;
TERMID termid;
+ size_t sysno_mem_index = 0;
+
+ if (zh->m_staticrank)
+ sysno_mem_index = 1;
yaz_log(YLOG_DEBUG, "get_first_snippet_from_rset");
yaz_log(YLOG_DEBUG, "get_first_snippet_from_rset");
@@
-119,11
+124,11
@@
static void get_first_snippet_from_rset(RSET rset, zebra_snippets *snippets,
*sysno = 0;
while (rset_read(rfd, &key, &termid))
{
*sysno = 0;
while (rset_read(rfd, &key, &termid))
{
- if (key.mem[0] != *sysno)
+ if (key.mem[sysno_mem_index] != *sysno)
{
if (*sysno)
break;
{
if (*sysno)
break;
- *sysno = key.mem[0];
+ *sysno = key.mem[sysno_mem_index];
}
if (termid)
{
}
if (termid)
{
@@
-238,7
+243,7
@@
static int scan_save_set(ZebraHandle zh, ODR stream, NMEM nmem,
glist[pos].term = 0;
glist[pos].display_term = 0;
glist[pos].term = 0;
glist[pos].display_term = 0;
- get_first_snippet_from_rset(rset, hit_snippets, &sysno);
+ get_first_snippet_from_rset(zh, rset, hit_snippets, &sysno);
if (sysno)
code = zebra_get_rec_snippets(zh, sysno, rec_snippets);
if (sysno)
code = zebra_get_rec_snippets(zh, sysno, rec_snippets);