Streams docs for content filtersI offer the following draft of a help file for using content filters. I think it's mostly correct.

The sections on item/field filters (the ones that start with "?") could use some help.
Attachment: Content_Filters.mc
Content Filters
Overview
The
Content Filter app (when installed) allows you to filter incoming content from all sources or from specific connections. The filtering may be based on words, tags, regular expressions, or language.
You can set global filters for all incoming content, and/or individual filters for each of your Connections.
If you add filters under
Do not import posts with this text, these are applied first, to remove matching content. Then, any filters under
Only import posts with this text are applied, to remove non-matching content.
Basic Filters
Language
lang=Match language if it can be identified
Example:
lang=de
(matches German-language content)
lang!=Anything except this language
Example:
lang!=en
(matches non-English content)
Hashtag
#Match hashtag
Example:
#cats
Category
$Match category (requires installing the
Categories app). Categories are "personal hashtags" that do not federate except between Streams instances.
Example:
$Science
Items and Fields
?Discussed below under
Advanced Filters
Regular Expressions (regex)
/Match a "regular expression". See numerous online help sites such as
Regular-Expressions.info for regex assistance.
Example:
/gr[ae]y/
(matches "gray" and "grey")
Text
Any text that doesn't start with one of the above charactersCase-insensitive text match
Example:
covid
(matches "covid", "COVID", "Covid", etc)
Advanced Filters
Items
?You can do a string/numeric/array/boolean match on the database fields of an item (a post, comment, etc). A complete listing is beyond the scope of this document, but see
install/schema_mysql.sql
and search for
CREATE TABLE IF NOT EXISTS `item`
. Here is a sampling:
body
(text of the message)
verb
(what this item does)
item_thread_top
(first post in a thread, boolean)
item_private
(0 = public message, 1 = restricted message, 2 = direct message)
- ...etc...
Available comparison operators are:
?foo ~= baz
-- item.foo contains the string 'baz'
?foo == baz
-- item.foo is the string 'baz'
?foo != baz
-- item.foo is not the string 'baz'
?foo >= 3
-- item.foo is greater than or equal to 3
?foo > 3
-- item.foo is greater than 3
?foo <= 3
-- item.foo is less than or equal to 3
?foo < 3
-- item.foo is less than 3
?foo {} baz
-- 'baz' is an array element in item.foo
?foo {*} baz
-- 'baz' is an array key in item.foo
?foo
-- true condition for item.foo
?!foo
-- false condition for item.foo (The values 0, '', an empty array, and an unset value will all evaluate to false)
Example:
?verb == Announce
(matches ActivityPub "boosts")
Fields
?+Field match: ?+field item.object
Usage is undocumented at present