|
From: Gilles D. <gr...@sc...> - 2002-10-01 22:25:25
|
A better place to post patches would be the htdig-general or htdig-dev
mailing list. They'll have a wider audience that way, and are less
likely to get mangled by SourceForge's bug tracker. Also, for purposes of
discussing changes to the code, htdig-dev is the best forum. (That's why
I'm moving this discussion there.)
The reason no one has taken up the task yet is that it's a bit more
complicated than what your patch does. First of all, the preferred way
to drop search results from the results list would be like how htsearch
handles matches outside of the date range. I.e. you'd do something like:
if (score <= 0.0)
{
delete thisRef;
continue;
}
Secondly, there's the issue of where in the code is the best place to
do this. You placed the test after the final score has been calculated,
but at that point it's in logarithmic form. It might be better to do it
before that. It might even be better still to do it before date_factor
and backlink_factor are factored in, and before the other adjustments
are applied, so that if a document has a base score of 0 it's rejected
regardless of how these other factors might boost the score. That would
mean the decision to select/reject is based solely on the word score
and not other scoring tweaks.
Finally, you could probably raise good arguments for doing it one way
or the other, or for having setable rejection thresholds as has been
suggested previously, or even for not rejecting them at all, so it may be
that this feature should be controlled by a new config attribute or two.
According to no...@so...:
> Bugs item #614270, was opened at 2002-09-25 01:58
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=104593&aid=614270&group_id=4593
>
> Category: htsearch
> Group: feature-requests
> Status: Open
> Resolution: Later
> Priority: 5
> Submitted By: Nobody/Anonymous (nobody)
> Assigned to: Nobody/Anonymous (nobody)
> Summary: Scoring
>
> Initial Comment:
> Is there a reason why an item appears in the result
> list that has a score or '0.0' ? Is this intented or
> is it a bug ?
>
> htdig-3.2.0b4-20020922
>
> dr...@el...
>
> ----------------------------------------------------------------------
>
> Comment By: Nobody/Anonymous (nobody)
> Date: 2002-10-01 10:11
>
> Message:
> Logged In: NO
>
> Please find below a patch for htdig-3.2.0b4-20020922 to not
> add '0.0' scored results to the results list ...
>
> diff -uPr htdig-3.2.0b4-20020922.orig/htsearch/Display.cc
> htdig-3.2.0b4-20020922/htsearch/Display.cc
> --- htdig-3.2.0b4-20020922.orig/htsearch/Display.cc Sat
> Jul 27 04:48:19 2002+++
> htdig-3.2.0b4-20020922/htsearch/Display.cc Tue Oct 1
> 17:23:43 2002
> @@ -1459,7 +1459,7 @@
> //
> // Append this match to our list of matches.
> //
> - matches.Add(thisMatch, thisRef->DocURL());
> + if (score > 0.0) matches.Add(thisMatch,
> thisRef->DocURL());
>
> // Get rid of it to free the memory!
> delete thisRef;
> @@ -1470,11 +1470,11 @@
> cerr << " score " << score << "(" <<
> thisMatch->getScore() << "), maxScore " << maxScore <<",
> minScore " << minScore << endl;
> }
>
> - if (maxScore < score)
> + if (score > 0.0 && maxScore < score)
> {if(debug) cerr << "Set maxScore = score" <<endl;
> maxScore = score;
> }
> - if (minScore > score)
> + if (score > 0.0 && minScore > score)
> {if(debug) cerr << "Set minScore = score" <<endl;
> minScore = score;
> }
>
> Hope this helps (and is in the right place) ...
>
> dr...@el...
>
> ----------------------------------------------------------------------
>
> Comment By: Gilles Detillieux (grdetil)
> Date: 2002-09-25 06:57
>
> Message:
> Logged In: YES
> user_id=149687
>
> It's not a bug, it's a lack of a feature. Doing just
> what you propose has been suggested before,
> and it will eventually find its way into the code,
> but no one has yet taken up the task.
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=104593&aid=614270&group_id=4593
>
--
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)
|