-/* $Id: zvrank.c,v 1.13 2004-11-04 13:09:06 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003
- Index Data Aps
+/* $Id: zvrank.c,v 1.16 2005-03-08 14:02:15 adam Exp $
+ Copyright (C) 1995-2005
+ Index Data ApS
This file is part of the Zebra server.
if (gocc==0)
idf=0.0;
else
- idf=blog(num_docs/gocc);
+ idf=blog(CAST_ZINT_TO_DOUBLE(num_docs/gocc));
idf=idf*idf;
ds->terms[i].idf=idf;
}
*/
static void zv_add (void *rsi, int seqno, TERMID term) {
RS rs=(RS)rsi;
+ int *ip = term->rankpriv;
+ int i=*ip;
if (!term)
{
yaz_log(log_level, "zvrank zv_add seqno=%d NULL term",seqno );
return;
}
- int *ip = term->rankpriv;
- int i=*ip;
rs->rdoc->terms[i].locc++;
yaz_log(log_level, "zvrank zv_add seqno=%d '%s' term_index=%d cnt=%d",
seqno, term->name, i, rs->rdoc->terms[i].locc );