Boolean Logic
Redd's most powerful feature is its ability to combine conditions using boolean logic trees. This allows you to move beyond simple "keyword A OR keyword B" filters and build highly specific monitoring rules.
Logic Groups
Every monitor is essentially a tree of logic. There are two types of groups:
AND Groups
An AND group requires every sub-condition within it to be true for the group to match.
- Example:
Subreddit is "python"ANDTitle contains "async". - Result: Only matches posts in r/python that also have "async" in the title.
OR Groups
An OR group requires at least one sub-condition within it to be true for the group to match.
- Example:
Title contains "hiring"ORTitle contains "job". - Result: Matches any post that has either "hiring" or "job" in the title.
Nesting Logic
You can nest these groups to any depth to create complex filters.
Example: Complex Logic Tree
Imagine you want to track job postings for Python or Go, but you want to exclude anything from "AutoModerator".
- AND (Root)
- OR (Language Group)
Subreddit is "python"Subreddit is "golang"
- OR (Keywords Group)
Title contains "hiring"Title contains "remote"
Author is NOT "AutoModerator"
- OR (Language Group)
In this tree, a post must be in either r/python or r/golang AND it must contain either "hiring" or "remote" AND it must not be posted by AutoModerator.
Visualizing Logic
In the Visual Builder, groups are represented by nested boxes. You can toggle a box between AND and OR with a single click.
In the JSON Editor, groups are defined by the $Type property (And or Or) and a SubConditions array.
| Logic Type | JSON $Type | Requirement |
|---|---|---|
| AND | And | All sub-conditions must match |
| OR | Or | Any one sub-condition must match |
When building a new monitor, start with a simple AND group. Add complexity only as you find you are getting too many irrelevant matches.