Excluding/negating words in search

While negating searches for tags is supported (-tag:thistag), there is no way to exclude certain words from a generic search.

The “-” character is often used to allow search users to explicitly list words that the results must not include.

Running the following queries against Search results for '' - Discourse Meta does not give me the results I would have expected:

  • “negative search” gives me 43 results with “negative” and/or “search” in them, as expected
  • “-negative search” gives me 43 results with “negative” and/or “search” in them, I expected no results that include “negative”
  • “-negative -search” gives me 43 results with “negative” and/or “search” in them, I expected results of everything that does not include “negative” nor “search”

Please support “-” in front of any word to exclude/negate it in a general search.

4 Likes