Re: Funny scoring.
Chin Huang (cthuang@io.org)
Sun, 09 Jun 1996 16:40:55 -0400
In article <3gHuxou+SaIB090yn@login.eunet.no>,
yngvar.folling@login.eunet.no (Yngvar Folling) wrote:
>But switch the line to
>
>8 pattern Keywords: chuckle|funny
>
>And the score suddenly jumps to 32. What's the matter? Aren't the two
>expressions equivalent? And as long as there's only one Keywords field,
>how can that line possibly give a score as high as 32?
[...]
>(Ten minutes later.) Nothing like spelling out a problem to think of
>possible solutions. I enclosed the entire regular expression in one
>single set of parentheses instead. That worked, but I thought the
>regular expression started *after* the field name.
The scoring code actually looks for lines matching the regular expression
^Keywords:.*chuckle|funny
Because of the precedence of the | operator, this regular expression
matches any line in the article header that contains the word "funny".
In the next release, I'm going to search on the header value, not the
entire line.