According to edwin lin:
> When I went to the link, the patch I got is the following line. Where should
> I put this in the program? Thanks,
> Edwin
>
> +++ parser.cc Sun Oct 22 18:22:58 2000
> @@ -378,6 +378,8 @@
> // Duplicate document. We just need to add the scores together
> //
> dm2->score += dm->score;
> + // dnaber: boost matches that contain more than one word
> (dnaber, 2000-10-22):
> + dm2->score = dm2->score * 1000;
> if (dm->anchor < dm2->anchor)
> dm2->anchor = dm->anchor;
> }
>
You should either apply the patch, using the patch command (e.g.
"cd htsearch; patch < /path/to/multiboost.1" -- see "man patch" for
details on this command), or you can manually apply the patch by editing
htsearch/parser.cc and adding the two lines that have the "+" signs to
the file, putting them right between the lines of context in the patch
(lines without + signs), at line 380. Of course, you must remove the
"+" signs when you manually add the lines to the file.
The manual approach is fine for small patches like this, but if you ever
need to apply a larger patch, you'll be glad you took the time to learn
how to use the patch command.
In any case, once the parser.cc file is patched or edited, you can edit
it to change the 1000 to the config.Value expression below if you want
the factor to be configurable at run time.
> >From: Gilles Detillieux <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED] (edwin lin)
> >CC: [EMAIL PROTECTED]
> >Subject: Re: [htdig] to search the site by key words
> >Date: Mon, 25 Jun 2001 15:45:25 -0500 (CDT)
> >
> >According to edwin lin:
> > > I installed the htdig. It worked fine except some features.
> > > For instance, if I search by key word breast cancer, it returns cancer
> > > first. The breast cancer page will be at the bottom of returns. How do I
> >fix
> > > that problem?
> >
> >There is a patch in the archives that boosts the score when you use the
> >"Any" method and more than one keyword is matched. It's at
> >
> > ftp://ftp.ccsf.org/htdig-patches/3.1.5/multiboost.1
> >
> >The only slight problem is the boosting factor of 1000 is hardcoded, but
> >you can make it configurable by changing the harcoded 1000 to something
> >like config.Value("multiboost_factor", 1000) to get the code to use a
> >multiboost_factor value from your config file, allowing you to experiment
> >with different values.
--
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