Filtering topic lists in Discourse

:bookmark: This guide explains Discourse’s advanced topic filtering system, including the complete query language syntax, filter options, and how to use the /filter route effectively.

:person_raising_hand: Required user level: All users

Using the Discourse topic filter query language

Discourse’s topic filter provides a powerful query language for finding topics based on multiple criteria. This advanced search interface allows you to combine filters, sort results, and create precise queries for any content on your forum.

Accessing the filter

You can access the topic filter in two ways:

Direct URL access:
Navigate to /filter on your Discourse instance (for example: https://meta.discourse.org/filter)

Sidebar navigation:
Click “More” in your sidebar, then select the filter option

The filter interface includes an intelligent autocomplete system that suggests available filters and values as you type.

Basic query syntax

Filters use a structured syntax with the format:

filter-name:value

Combine multiple filters:

category:support status:open created-after:2023-01-01

Include regular search terms:

category:support ssl certificate error

This searches for topics in the “support” category containing the words “ssl certificate error”.

Category filters

category: (alias: categories:)

Filter topics by category

Basic usage:

category:support
category:dev,support          # Topics in dev OR support categories
category:documentation:admins # Topics in admins subcategory of documentation

Advanced prefixes:

  • = - Category without subcategories: =category:general
  • - - Exclude category: -category:off-topic
  • -= - Exclude category without subcategories: -=category:meta

Examples:

category:bug,feature          # Include bug or feature categories (with subcategories)
=category:bug,feature         # Include bug or feature categories (without subcategories)
-category:bug,feature         # Exclude bug or feature categories (with subcategories)
-=category:bug,feature        # Exclude bug or feature categories (without subcategories)

Tag filters

tag: (alias: tags:)

Filter topics by tags (requires tagging to be enabled)

Basic usage:

tag:bug
tag:feature,enhancement       # Topics with feature OR enhancement tags
tag:bug+urgent               # Topics with BOTH bug AND urgent tags

Exclusion:

-tag:solved                  # Exclude topics with solved tag
-tag:bug+urgent              # Exclude topics with both bug and urgent tags
-tag:bug,urgent              # Exclude topics with bug or urgent tags

tag_group:

Filter by tag groups

Basic usage:

tag_group:moderation
-tag_group:staff-only        # Exclude topics with tags from staff-only group

Date filters

All date filters support both specific dates (YYYY-MM-DD) and relative days:

Activity dates

  • activity-before: - Topics with last activity before date
  • activity-after: - Topics with last activity after date

Creation dates

  • created-before: - Topics created before date
  • created-after: - Topics created after date

Latest post dates

  • latest-post-before: - Topics with latest post before date
  • latest-post-after: - Topics with latest post after date

Date format examples:

created-after:2023-12-25     # Specific date (YYYY-MM-DD)
created-after:30             # 30 days ago
created-after:1              # Yesterday
created-after:0              # Today

Quick suggestions:

  • 1 - Yesterday
  • 7 - Last week
  • 30 - Last month
  • 365 - Last year

User filters

created-by:

Filter by topic author

Basic usage:

created-by:username
created-by:user1,user2       # Topics by user1 OR user2
created-by:@username         # @ prefix is optional

Personal filters (authenticated users only)

in:

Filter by your personal relationship to topics

Available options:

  • in:pinned - Topics pinned for you
  • in:bookmarked - Topics you’ve bookmarked
  • in:watching - Topics you’re watching
  • in:tracking - Topics you’re tracking
  • in:muted - Topics you’ve muted
  • in:normal - Topics with normal notification level
  • in:watching_first_post - Topics where you watch first post only

Examples:

in:bookmarked category:support
in:watching,tracking         # Topics you're watching OR tracking

Numeric filters

Like filters

  • likes-min: - Minimum total likes across all posts
  • likes-max: - Maximum total likes across all posts
  • likes-op-min: - Minimum likes on opening post
  • likes-op-max: - Maximum likes on opening post

Post count filters

  • posts-min: - Minimum number of posts
  • posts-max: - Maximum number of posts

Participant filters

  • posters-min: - Minimum number of participants
  • posters-max: - Maximum number of participants

View count filters

  • views-min: - Minimum view count
  • views-max: - Maximum view count

Examples:

likes-min:10                 # Topics with at least 10 likes
posts-min:5 posts-max:20     # Topics with 5-20 posts
views-min:100 likes-op-min:5 # Popular topics with engaged opening posts

Status filters

status:

Filter by topic status

Available statuses:

  • status:open - Open topics (not closed or archived)
  • status:closed - Closed topics
  • status:archived - Archived topics
  • status:listed - Listed (visible) topics
  • status:unlisted - Unlisted topics
  • status:deleted - Deleted topics (requires permission)
  • status:public - Public topics (non-restricted categories)

Plugin-specific statuses:

  • status:solved - Solved topics (with Solved plugin)
  • status:unsolved - Unsolved topics (with Solved plugin)

Examples:

status:open category:support
status:closed created-after:30

Sorting options

order:

Sort results by different criteria

Available sorts:

  • order:activity - Latest activity (default, descending)
  • order:activity-asc - Oldest activity first
  • order:created - Creation date (newest first)
  • order:created-asc - Oldest first
  • order:latest-post - Latest post date
  • order:latest-post-asc - Oldest latest post
  • order:likes - Most likes across all posts
  • order:likes-asc - Least likes
  • order:likes-op - Most likes on opening post
  • order:likes-op-asc - Least likes on opening post
  • order:posters - Most participants
  • order:posters-asc - Least participants
  • order:title - Alphabetical by title
  • order:title-asc - Reverse alphabetical
  • order:views - Most views
  • order:views-asc - Least views
  • order:category - Category name
  • order:category-asc - Reverse category name
  • order:read - Last read date (authenticated users)
  • order:read-asc - Oldest read first

Advanced examples

Find popular recent discussions:

created-after:7 likes-min:10 order:likes

Support topics needing attention:

category:support status:open posts-max:3 created-after:7

Your bookmarked development topics:

category:dev in:bookmarked order:activity

Exclude solved bug reports:

category:bug -tag:solved status:open order:created

High-engagement topics from specific users:

created-by:admin,moderator likes-min:5 views-min:100

Recent unlisted topics (staff only):

status:unlisted created-after:30 order:created

Autocomplete features

The filter input provides intelligent suggestions:

  1. Filter suggestions - Shows available filters as you type
  2. Category autocomplete - Suggests categories by name or slug
  3. Tag autocomplete - Suggests tags with post counts
  4. Username autocomplete - Suggests usernames with display names
  5. Date suggestions - Offers quick date options (yesterday, last week, etc.)
  6. Prefix support - Shows prefix options for categories and tags

Tips and best practices

  1. Use autocomplete - The filter interface provides intelligent suggestions as you type
  2. Combine filters - Mix different filter types for precise results
  3. Share filter URLs - Filter URLs are shareable - copy the URL to share your search
  4. Add useful filters to your sidebar - Filter URLs can be added to your sidebar for easy access
  5. Use exclusion - Use - prefix to exclude unwanted results
  6. Date shortcuts - Use numbers for relative dates (30 = 30 days ago)
  7. Keyboard navigation - Use arrow keys to navigate suggestions, Tab/Enter to select

Creating custom sidebar links

You can add filter links to your sidebar as custom links:

  1. Go to your sidebar settings
  2. Add a custom link with a filter URL like /filter?q=category:support status:open
  3. Give it a descriptive name like “Open Support Topics”

Technical notes

  • The filter uses full-text search for keywords combined with filters
  • Minimum search term length applies to keyword searches
  • Results are permission-aware - you only see topics you can access
  • Filter queries are processed server-side for performance
  • The feature supports plugin extensions for custom filters

Additional resources

Last edited by @sam 2025-07-24T10:22:50Z

Check documentPerform check on document:
7 Likes

3 posts were split to a new topic: Build onebox support for topic filters

Is this possible? I know you can watch first posts only in a category, but how does that work on a topic?

2 Likes

Probably needs clarification, I think it will find all the topics in categories you watch first post, will update

1 Like