Advanced Scoring Advanced Scoring Examples
Ordinary scoring rules have a string as the first element in the rule.
Advanced scoring rules have a list as the first element. The second
element is the score to be applied if the first element evaluated to a
non-nil
value.
These lists may consist of three logical operators, one redirection operator, and various match operators.
Logical operators:
&
and
|
This logical operator will evaluate each of its arguments until it finds
one that evaluates to |
|
or
|
This logical operator will evaluate each of its arguments until it finds
one that evaluates to |
!
not
¬
|
This logical operator only takes a single argument. It returns the logical negation of the value of its argument. |
There is an indirection operator that will make its arguments
apply to the ancestors of the current article being scored. For
instance, 1-
will make score rules apply to the parent of the
current article. 2-
will make score rules apply to the
grandparent of the current article. Alternatively, you can write
^^
, where the number of ^
s (carets) says how far back into
the ancestry you want to go.
Finally, we have the match operators. These are the ones that do the
real work. Match operators are header name strings followed by a match
and a match type. A typical match operator looks like `("from" "Lars Ingebrigtsen" s)
'. The header names are the same as when using
simple scoring, and the match types are also the same.