# Topics list filter feature

**URL:** https://meta.discourse.org/t/topics-list-filter-feature/263641
**Category:** Feature
**Tags:** feedback, topic-filter
**Created:** [May 3, 2023, 4:44am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641 "2023-05-03T04:44:53Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [May 3, 2023, 4:44am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/1 "2023-05-03T04:44:54Z")

</div>

We have recently introduced an innovative [/filter](https://meta.discourse.org/filter) route, enabling more sophisticated filtering of the topics list. Significantly, this marks the initial step towards a unified topic filtering language for both search and filtering. Additionally, the dedicated route for topic list filtering enhances the customizability of the sidebar, as users can now incorporate links as [custom section links](https://meta.discourse.org/t/custom-sidebar-sections-being-tested-on-meta/255303) within the sidebar.

### How it works

The [/filter](https://meta.discourse.org/filter) has an input field which users can input a query string to filter through the list of topics.

As an example, [category:documentation tag:how-to+email](https://meta.discourse.org/filter?q=category%3Adocumentation%20tag%3Ahow-to%2Bemail) will filter for topics that are in the #Documentation category tagged with both #how-to and #email.

Currently this is the list of filters that are supported:

> `status:open` topics that are not closed or archived  
> `status:closed` topics that are closed  
> `status:public` topics that are not read restricted (eg: belong to a secure category)  
> `status:archived` topics that are archived  
> `status:unlisted` topics that are not visible  
> `status:listed` topics that are visible  
> `status:deleted` topics
> 
> `in:pinned` topics that are are pinned (either global or per category pins)  
> `in:watching` stuff I am watching - supports (`muted`,`normal`,`tracking`, `watching_first_post`): allow for filtering down to stuff your are tracking, watching etc. - multiple values can be comma separated  
> `in:bookmarked` stuff I’ve bookmarked
> 
> `category:bug` topics in the bug category AND all subcategories  
> `=category:bug` topics in the bug category excluding subcategories  
> `category:documentation:admins` topics in the admins subcategory of documentation  
> `category:bug,feature` topics in the bug or feature category including all subcategories  
> `=category:bug,feature` topics in the bug or feature category excluding all subcategories  
> `-category:bug,feature` excluding topics in the bug or feature category including all subcategories  
> `-=category:bug,feature` excluding topics in the bug or feature category only excluding all subcategories  
> `categories:` alias for `category`
> 
> `tag:bug+feature` topics tagged both bug and feature  
> `tag:bug,feature` topics tagged either bug or feature  
> `-tag:bug+feature` excluding topics tagged bug and feature  
> `-tag:bug,feature` excluding topics tagged bug or feature  
> `tags:` alias for `tag`
> 
> `tag_group:tag_group_name` topics tagged with any tags that are in `tag_group`  
> `-tag_group:tag_group_name` excluding topics tagged with any tag that is in `tag_group`
> 
> `created-by:@USERNAME` topics created by a specific user
> 
> `posts-min:X` topics with X or more amount of posts  
> `posts-max:X` topics with no more than max posts  
> `posters-min:X` topics where at least X different users have posted  
> `posters-max:X` topics where at most X different users have posted  
> `likes-min:X` topics with X or more number of likes  
> `likes-max:X` topics with no more than X number of likes  
> `likes-op-min:X` topics with first post that has X or more number of likes  
> `likes-op-max:X` topics with first post that has no more than X number of likes  
> `views-min:X` topics with X or more number of views  
> `views-max:X` topics with no more than X number of views
> 
> `activity-before:YYYY-MM-DD` topics with latest bump before specified date  
> `activity-after:YYYY-MM-DD` topicslatest bump after specified date  
> `created-before:YYYY-MM-DD` created before specified date  
> `created-after:YYYY-MM-DD` created after specified date  
> `latest-post-before:YYYY-MM-DD` latest post created before specified date  
> `latest-post-after:YYYY-MM-DD` latest post created after specified date
> 
> `order:activity` order by bump date desc  
> `order:latest-post` order by latest post creation desc  
> `order:created` order by topic creation desc  
> `order:views` order by topic views desc  
> `order:likes` order by number of likes in the topic desc  
> `order:likes-op` order by number of likes in the first post of each topic desc  
> `order:posters` order by number of people who have posted desc  
> `order:category` order by category name  
> `order:ANY-asc` flip order on results so it is ascending

> [@nathank](#):
>
> I’ve got a couple of things which would be good to have in the OP:
> 
> ### Order by title (i.e. alphabetically)
> 
> We can now also order by `title` (which is super useful):
> 
> ### Subcategories
> 
> You can target subcategories using this format:  
> `category:catslug:subcatslug`

### Feedback

We would love to find out from the community here if this feature will be valuable for your own community and would also like to know how you’re using it.

If there are any filters that you feel like will help you with your needs, do let us know as with with examples of what you are trying to do.

Finally, we want to highlight that this is a very early version of the feature and it is still considered experimental at this point. The user experience needs improvement and we are currently working on adding some sort of inline autocomplete or even an interface to allow users to build out a topics filtering query language without having to remember all the filters by heart.

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [May 3, 2023, 6:18am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/2 "2023-05-03T06:18:55Z")

</div>

What did I miss…?  
It doesn’t look like it returns topics that are in the #Contribute > Bug category tagged with both #chat and #pri-high .

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/c/7/ec7fcffc23b19dedbf8f351660e7e06f7edd031e.png)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [May 3, 2023, 6:28am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/3 "2023-05-03T06:28:42Z")

</div>

I don’t think you should be able to see the priority tags. They’re just for us. 🤫 🙂

Does it work if you don’t include it?

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [May 3, 2023, 6:30am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/4 "2023-05-03T06:30:04Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/2/5/1/251f9aa514dc23dc2957eda17f4a43365efba08b.png)  
Looks like if I remove this tag it doesn’t work either

* * *

> [@tgxworld](#):
>
> `tags:` alias for `tag`

update: the “alias” works perfectly.

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/1/2/712c20754ed277fc768cfa65ddc5cbad71147f2b.png)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [May 3, 2023, 6:52am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/6 "2023-05-03T06:52:10Z")

</div>

Sorry I just realised my PR to add support for the `tag:` alias was not merged.

[https://github.com/discourse/discourse/pull/21353](https://github.com/discourse/discourse/pull/21353)

It has now been merged so the `tag:` alias should work soon.

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [May 3, 2023, 7:32am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/7 "2023-05-03T07:32:02Z")

</div>

Another problem: `tags` filter currently don’t support non-ASCII characters, such as Chinese.

Example: [`tags:一个不存在的标签`](https://meta.discourse.org/filter?q=tags%3A%E4%B8%80%E4%B8%AA%E4%B8%8D%E5%AD%98%E5%9C%A8%E7%9A%84%E6%A0%87%E7%AD%BE) returns every topics, but [`tags:a-non-existent-tag`](https://meta.discourse.org/filter?q=tags%3Aa-non-existent-tag) returns nothing, as expected.

* * *

I checked the source, it’s caused by

```ruby
    value.scan(
        /\A(?<tag_names>([a-zA-Z0-9\-]+)(?<delimiter>[,+])?([a-zA-Z0-9\-]+)?(\k<delimiter>[a-zA-Z0-9\-]+)*)\z/,

```

---

<div class="post-metadata">

### Author: ![gingerman](https://avatars.discourse-cdn.com/v4/letter/g/47e85d/32.png) [@gingerman](https://meta.discourse.org/u/gingerman)
#### Post date: [May 3, 2023, 8:31am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/8 "2023-05-03T08:31:38Z")

</div>

Kudos for the nice work @tgxworld . This opens up multiple possibilities.

Just curious to know if it could provide a contextual filtering option ?

For eg. If I select announcements category from sidebar, can we show the filter panel (the new one you have created) at the top to filter by multiple tags (chat, new-feature) within the category.

Currently one cannot filter by multiple tags as an end user intuitively - manually we have to use /tags/interesection/chat/new-feature endpoint. End users may not be aware of this possibility especially to do it within a category.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [May 5, 2023, 8:53am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/13 "2023-05-05T08:53:26Z")

</div>

> [@Lhc\_fl](#):
>
> Example: [`tags:一个不存在的标签`](https://meta.discourse.org/filter?q=tags%3A%E4%B8%80%E4%B8%AA%E4%B8%8D%E5%AD%98%E5%9C%A8%E7%9A%84%E6%A0%87%E7%AD%BE) returns every topics, but [`tags:a-non-existent-tag`](https://meta.discourse.org/filter?q=tags%3Aa-non-existent-tag) returns nothing, as expected.

O good catch. I have a fix for tags in

[https://github.com/discourse/discourse/pull/21405](https://github.com/discourse/discourse/pull/21405)

The `category` filter will need a similar fix but it is slightly more complicated. I should have it completed by next week.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [May 16, 2023, 9:54am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/17 "2023-05-16T09:54:30Z")

</div>

There’s a missing translation string when a new topic appears in `/filter`:

`[en.topic_count_all count=1]`

---

<div class="post-metadata">

### Author: ![kinetiksoft](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kinetiksoft/32/229578_2.png) [@kinetiksoft](https://meta.discourse.org/u/kinetiksoft)
#### Post date: [June 1, 2023, 10:50am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/18 "2023-06-01T10:50:15Z")

</div>

The feature sounds solid and will definitely help building better & customized feeds of topics for our users! Thank you!

Meanwhile I have a question if this feature allows us to approach embedding latest **posts** from across multiple topics within specific categories/tags?

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [June 2, 2023, 10:32am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/19 "2023-06-02T10:32:27Z")

</div>

> [@kinetiksoft](#):
>
> Meanwhile I have a question if this feature allows us to approach embedding latest **posts** from across multiple topics within specific categories/tags?

No, that’s not currently part of the plan here, I don’t think.

If you give the current feature a try as is and still find this is something you’d like to be able to do, can you start a new topic about it with a bit more detail about what you’re thinking?

---

<div class="post-metadata">

### Author: ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)
#### Post date: [June 9, 2023, 5:49am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/20 "2023-06-09T05:49:09Z")

</div>

Thanks for this very useful feature!

> [@tgxworld](#):
>
> `created-by:@USERNAME`

Would it be possible to also add `created-by:me` or something similar that automatically filters for topics created by the current user? This would of course be similar to `/my/activity/topics` , but it might be useful for combining with other filters and adding it to the sidebar for all users.

Also, how about a `in:participated` filter for all topics that I have posted in regardless of their tracking/notification setting?

---

<div class="post-metadata">

### Author: ![aas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aas/32/289331_2.png) [@aas](https://meta.discourse.org/u/aas)
#### Post date: [June 22, 2023, 10:42pm UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/22 "2023-06-22T22:42:00Z")

</div>

This is great! 🙏 I’d also love to have support for `status:unsolved`. I also think it would be great if we could construct a filter with something like `assigned:me` so that the result is different, depending on the user. Use case: a bot that messages our moderators with links they can click to pull up their assigned topics. This would be handy so that we can have a generic message that is sent to all moderators with links to all the queries they need to reference when moderating the forum. Obviously, they can navigate to the assigned topics easily from the web UI, but I think it would be a small QoL improvement if they can click a link or bookmark.

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [June 23, 2023, 10:15am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/23 "2023-06-23T10:15:45Z")

</div>

> [@aas](#):
>
> I also think it would be great if we could construct a filter with something like `assigned:me` so that the result is different, depending on the user.

There is some precedence for this kind of thing in the current feature, so I think we can certainly consider other things like this:

> [@tgxworld](#):
>
> `in:watching` stuff I am watching - supports (`muted`,`normal`,`tracking`, `watching_first_post`): allow for filtering down to stuff your are tracking, watching etc. - multiple values can be comma separated  
> `in:bookmarked` stuff I’ve bookmarked

---

<div class="post-metadata">

### Author: ![tonyzhu163](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tonyzhu163/32/313529_2.png) [@tonyzhu163](https://meta.discourse.org/u/tonyzhu163)
#### Post date: [June 28, 2023, 1:24pm UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/24 "2023-06-28T13:24:45Z")

</div>

Hi,

Can someone let me know if this is in the public version or some sort of beta? Didn’t find the setting.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [June 28, 2023, 1:28pm UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/25 "2023-06-28T13:28:57Z")

</div>

Hi Tony 👋

Is your instance up-to-date?

I have the setting on my test forum:

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/0/d/90d17699e5d8afe1ebdb293029945dac50c851c2.png)

It’s also available on Discourse Hosted forums, not only self-hosted.

As stated it’s “experimental”, which means there might/will be many changes over time, and bugs or inconsistency to expect.

---

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [September 8, 2023, 10:27am UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/26 "2023-09-08T10:27:01Z")

</div>

I already find this very helpful to explain basic functionality of Discourse to community managers new to the platform. That is: _We have a collection of topics and we can filter and sort them in many ways._

So far, these filters have been spread out across the interface, but the filter route offers one central place to access and learn about the available options:

 ![image](https://global.discourse-cdn.com/meta/original/4X/b/3/5/b35bfac4b8a7a5b0c767f6dccacbc3ec65200750.png)

With this in mind, I’d find it helpful to have two more options included:

- in the **Date** section, also filter by relative time (last week, month, year,..)
- in the **Sort** section, also sort by popularity (which is different to number of likes)

---

<div class="post-metadata">

### Author: ![not-ethan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/not-ethan/32/282617_2.png) [@not-ethan](https://meta.discourse.org/u/not-ethan)
#### Post date: [September 8, 2023, 12:43pm UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/27 "2023-09-08T12:43:03Z")

</div>

I like the feature. I would like to be able to search just for plain text though. Sometimes I find my self needing to find a deleted topic but dont know what user made it so I need to go through a bunch before I find it instead of juts being able to search through deleted with a key word(s)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [September 8, 2023, 2:54pm UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/28 "2023-09-08T14:54:33Z")

</div>

I think the aspiration is to wire this up to the Search at some point in the future for parity, though I’m afraid there’s no definitive timeline on that.

---

<div class="post-metadata">

### Author: ![Maddieman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maddieman/32/213288_2.png) [@Maddieman](https://meta.discourse.org/u/Maddieman)
#### Post date: [September 21, 2023, 2:18pm UTC](https://meta.discourse.org/t/topics-list-filter-feature/263641/29 "2023-09-21T14:18:54Z")

</div>

Can you sort / order the result by the number of replies or number of votes? I was hoping to use this to list feature requests ordered by community interest, while filtering out those tagged as ‘implemented’. However, it doesn’t seem to be an option.

My use case is described in more detail [here](https://meta.discourse.org/t/filter-topics-without-a-specific-tag/80253/10).

[Next page](https://meta.discourse.org/t/topics-list-filter-feature/263641.md?page=2)
