46

I know you can do in:#channel to only get results from a channel, but is there a way to filter out results from a channel? A lot of our channels are spammed with automated messages and it adds noise to the search results.

4 Answers 4

49

The search feature allows you to exclude words from the result by putting a minus sign in front of a word.

Examples:

hot -potato

will only return messages containing hot, but not potato.

To exclude a channel from the results use searchTerm -in:channelName. Do not add a # in front of the channel name.

5
  • 7
    Yes I know that but apparently that rule doesn't apply to channels. E.g. foo -in:#channel does not work Dec 20, 2018 at 0:39
  • 3
    works on my machine :-) yet I needed to include the # sign. May have changed recently.
    – user152468
    May 7, 2020 at 9:32
  • 3
    Interestingly, for me it only works if I don't include the #... 🤷‍♂️
    – chesterbr
    Jun 8, 2020 at 22:18
  • For me both of below filters worked, just make sure you are using correct channel name my_search_term -in:#sfdc-pusher-alerts -in:us_demo_notes
    – Halim
    Dec 17, 2020 at 3:50
  • 1
    Omitting thread comments from results with -is:thread did not seem to work for me. Sep 21, 2022 at 14:16
8

I found that this is possible as a global setting (which is less than convenient, but may still be useful). According to this Help Center page (Under the "Exclude channels from search" section):

  1. From your desktop, click your workspace name in the top left.
  2. Choose Preferences from the menu.
  3. Click Search. (I had to click "Advanced" under which there was a "Search Options" section)
  4. Under Don't search these channels ("Exclude these channels from search results" for me), click the box to pick channels to exclude.
3
  • Looks like the article has changed since, and I can't find where the information has moved. Unfortunately, I didn't have the foresight to archive it either...
    – Chris Real
    Apr 13, 2020 at 20:55
  • It seems to work only for public channels through Feb 3, 2021 at 16:28
  • 1
    This still works. Now under Preferences > Advanced > Exclude these channels from search results: Updated documentation link: slack.com/intl/en-ca/help/articles/… Jul 22, 2021 at 2:55
6

For me both of below filters worked, just make sure you are using correct channel name

my_search_term -in:#sfdc-pusher-alerts -in:us_demo_notes

1
  • This works. Thank you.
    – Carl Smith
    Jun 1 at 8:45
1

This is mentioned in their online help:

enter image description here

To get there, click on Learn more in Slack search box's bottom right corner: enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.