According to me:
> According to Evaldas Imbrasas:
> > I use htdig 3.1.6 on linux. Search database has only ~5000 documents. I
> > just tried to search for 'something*' (keyword + star), and two best
> > matches displayed 109 'empty star' images (yes, I counted them) in
> > search results page! The third match had 5 'full star' images, the
> > fourth one - 4 'full stars' and so on. It does not happen everytime I
> > search for some keyword + *, but it did happened a few times with
> > different keywords + * (fuzzy search). It never happened for regular
> > searches (without *).
...
> Apparently there's something very wierd happening with scoring of the
> prefix fuzzy searches. You don't mention what your locale is set to,
> but if you use a locale in which the decimal point is a comma, you may
> have to use a comma rather than a period for the prefix weight in
> search_algorithm. It may be that all prefix matches are getting a
> score of 0, so if there are no exact matches, it can't figure out the
> maximum score correctly. I'll look at the code to confirm this hunch,
> but do check your locale and maybe try changing the prefix weight.
>
> See http://www.htdig.org/attrs.html#locale
> and http://www.htdig.org/attrs.html#search_algorithm
Could you also try removing the following line, at line 900, from
htsearch/Display.cc:
maxScore = ref->DocScore();
Not only do I believe this line to be unnecessary, I think it may also
mess up the calculations of number of stars and of the PERCENT template
variable if the maximum score is 0, and some matches have negative scores.
(This is also a problem in 3.2.0b4, I believe, as is the test against 0
in that version. In 3.2, a maximum score of 0 is valid, but if the
maximum and minimum are the same, you have to treat that as a special
case.)
I don't know why you'd get negative scores in 3.1.6 - that doesn't seem
to make a lot of sense to me - but that's the only thing I can think of
that would cause the behaviour you report.
I also think, for the sake of defensive programming, that after the
score calculation on line 896, there should be a test like the following:
if (score < 0.0)
score = 0.0;
else if (score > 1.0)
score = 1.0;
Anyone else care to comment? This is part of the code I haven't really
played with before.
--
Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba Phone: (204)789-3766
Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html