Re: Re: [htdig] PERCENT returning 1% on big hits

"Joe R. Jah" <[email protected]>
Newsgroups gmane.comp.web.htdig.devel
Message-ID <[email protected]>
On Fri, 2 Jul 2004, Gilles Detillieux wrote:

> Date: Fri, 2 Jul 2004 11:50:40 -0500 (CDT)
> From: Gilles Detillieux <[email protected]>
> To: Joe R. Jah <[email protected]>
> Cc: "ht://Dig developers list" <[email protected]>
> 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        [email protected]

> 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: <[email protected]>
> Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/
> Dept. Physiology, U. of Manitoba  Winnipeg, MB  R3E 3J7  (Canada)



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
ht://Dig Developer mailing list:
[email protected]
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.