From: Jim <li...@yg...> - 2004-07-01 21:45:14
|
On Thu, 1 Jul 2004, Eli White wrote: > In fact, due to cross-linking of terms, some of those can have a VERY HIGH > score. > > The problem is, that at some point, it seems we passed a threshold, and for > those extremely high hits, the PERCENT result is messed up. > > It appears as if it occurs when it wants to give a score HIGHER than 100%, > and ends up printing 1% instead. Looks like a bug has crept into the handling of PERCENT. As you indicate, the problem is in fact tied to high scores. The score, which is stored as an int, is multiplied by 100 (literal), resulting in an overflow whenever the score is much more than 20 million. If the result ends up negative, percent is manually set to 1; otherwise you just get whatever garbage resulted from the overflow. Based on a quick look, I think it is an easy fix. However you would need to touch the source and rebuild at least htsearch. My assumption is that if you replace the 100 with 100.0 at line 314 of htsearch/Display.cc (for ht://Dig 3.1.6), then you will avoid the overflow and correct the problem you are encountering. I haven't actually tested this. If you are able to test this and it solves the problem, please let us know. You might also consider submitting a bug report if you get a chance just to make sure this issue doesn't get lost in the shuffle. Jim > Can anyone shed some light on why this is happening? It happens with 3.1.5 > AND 3.1.6 ... > > Some example star/percent/score results to peruse: > > Search (A) > Result 1: 1% - 5 stars - score: 40695460 > Result 2: 24% - 2 stars - score: 9850704 > Result 3: 24% - 2 stars - score: 9808377 > Result 4: 16% - 2 stars - score: 8606539 > > Search (B) > Result 1: 11% - 5 stars - score: 48628560 > Result 2: 43% - 3 stars - score: 21387546 > Result 3: 23% - 2 stars - score: 11271058 > Result 4: 17% - 2 stars - score: 8733621 > > Search (C) > Result 1: 1% - 5 stars - score: 761285184 > Result 2: 1% - 1 star - score: 51412848 > Result 3: 1% - 1 star - score: 43010124 > Result 4: 2% - 1 star - score: 20066298 > > And so on ... > > Thanks in advance, > Eli |