On Fri, 18 Jan 2002, Gilles Detillieux wrote:

No, I didn't think it was complicated to code--just to figure out the
cleanest way to do it. ;-)

> something that originally seemed very complicated), but I'd appreciate a
> few extra eyeballs on this code, or some other testers.  The weight is

> +             else if (strcmp(word.get(), prefix_suffix) == 0)
> +             {
> +                 tempWords.Add(new WeightWord(prefix_suffix, 1.0));
> +             }

This won't work in the case where people set prefix_suffix to '' to run
prefix matching on everything. We probably want a test something like:

((strnlen(prefix_suffix) != 0 && strcmp(word.get(), prefix_suffix) == 0) ||
(strnlen(prefix_suffix) == 0 && strcmp(word.get(), "*") == 0))

Maybe that can be simplified.

> +    if (strcmp(temp.get(), prefix_suffix) == 0) {

Same problem here.

-Geoff


_______________________________________________
htdig-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/htdig-dev

Reply via email to