From: Joe R. J. <jj...@cl...> - 2004-07-02 18:30:48
|
On Fri, 2 Jul 2004, Gilles Detillieux wrote: > Date: Fri, 2 Jul 2004 11:50:40 -0500 (CDT) > From: Gilles Detillieux <gr...@sc...> > To: Joe R. Jah <jj...@cl...> > Cc: "ht://Dig developers list" <htd...@li...> > Subject: Re: [htdig-dev] Re: [htdig] PERCENT returning 1% on big hits > > According to Joe R. Jah: > > If it works we can fix 3.2.0b6 too: > > > > --- htsearch/Display.cc.orig Fri May 28 06:15:24 2004 > > +++ htsearch/Display.cc Thu Jul 1 15:51:29 2004 > > @@ -362,7 +362,7 @@ > > > > if (maxScore != 0 && maxScore != minScore) > > { > > - int percent = (int)((ref->DocScore() - minScore) * 100 / > > + int percent = (int)((ref->DocScore() - minScore) * 100.0 / > > (maxScore - minScore)); > > if (percent <= 0) > > percent = 1; > > > > Thanks, Joe, but this shouldn't be an issue with the 3.2 code. > Not that your patch would hurt anything, and indeed it makes it more > clear what's going on, but it won't make any difference as far as > generated code. In 3.2, DocScore() and minScore are doubles, not ints, > so the multiplication will be done using doubles as well. The problem > in 3.1.x is DocScore() was an int. Thanks Gilles; I put in the old patch archives: ftp://ftp.ccsf.org/htdig-patches/3.2.0b6/0ld/percent.0 Regards, Joe -- _/ _/_/_/ _/ ____________ __o _/ _/ _/ _/ ______________ _-\<,_ _/ _/ _/_/_/ _/ _/ ......(_)/ (_) _/_/ oe _/ _/. _/_/ ah jj...@cl... > The 3.1.6 patch seems bang on, as far as I can tell. This certainly > explains some of the complaints we've had in the past about weird > rankings in 3.1.x, but never got to the bottom of. > > -- > Gilles R. Detillieux E-mail: <gr...@sc...> > Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/ > Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada) |