3.2.3 title-or-content Rules

When searching for text in entries on which to score, it can be convenient to check both title and content. Rather than repeating each rule in both the “title” and “content” elements of the score file, you can use “title-or-content” rules. These rules consist of eight elements, not seven:

  1. :text The match text, as with title & content rules
  2. :title-value The title match value

    The value by which an entry’s score will be adjusted when the title matches. This allows different scoring values for title & content matches, on the assumption that a title match would be considered more significant.

  3. :content-value The content match value

    The value by which an entry’s score will be adjusted when the content matches.

  4. :type The match type as per above.
  5. :date Last match time Again, this & all following elements are optional, and elfeed-score will keep this element up-to-date.
  6. :tags Tag scoping rules
  7. :hits Hit count
  8. :feeds Feed scoping rules

Note that both entry attributes are checked, so both score values have the potential to added to any given entry.

For instance, the following rule:

("title-or-content"
  (:text "california" :title-value 150 :content-value 100 :type s))

would add 150 to any element who’s title contains the string “california”, as well as 100 if its content also contains that text.