Searching for "-[feature-request] [comments]" should return a list of questions that have the tag [comments] but not the tag [feature-request]. The right hand sidebar says that, but the search results are identical to "[feature-request] [comments]".

As random points out, the operator works, but seems to be broken if a minus sign is the first tag in the resulting search URL. This is a problem because the system re-orders the tags when you put them into the search box, always putting the one with the minus sign first.

Edit: Here's another behaviour that I haven't encountered until now. I was trying to pattern search for tags that contain 'array' but NOT include '-array', so I did the search like so. The resulting page shows the right tags with the right operators on them, but the results aren't being filtered properly (the first result includes [multidimensional-array]). So I simplified and did this (1,960 results), and then did this (1,963 results -- what??), which still included that first question with [multidimensional-array] on it. Something is not working right here.

  • I figured out why the search bar reorganizes the tags with - first: entering a pure tag search in the will sort the tags alphabetically, and - apparently precedes everything else. However, if you include non-tag parameters, this sorting does not occur. Doesn't fix the underlying issue, but it's something to note.
    – Grace Note StaffMod
    May 14, 2010 at 17:46

2 Answers 2


We don't allow searches that begin with NOT aka -.

If you try to begin a search with a not, we will strip it out. Any term beyond the first one can be a not. (and yes, this means any not search must contain more than one term by definition, and that's intentional).

That said, the re-ordering of tags was an unintentional side effect of the parsing, so I have fixed that.

  • 2
    It still doesn't make sense to me to not be able to put -[tag1] [tag2] into the search box (surely you can check for a single tag in the search box with a NOT operator on it), but at least [tag1] -[tag2] is fixed, which is much better. Thanks!
    – Jon Seigel
    May 15, 2010 at 16:23

You'll have to reorder it so that the tags you want to exclude come last in the query.

Like so:

[comments] -[feature request]

As you've pointed out, no matter how you plug them into the search box, it will return them munged up and without the correct exclusion ordering.

So then you have to URL hack that up.

Is that intuitive? Who knows.

Pick up some milk on the way back.

  • UGH. When you type the query into the search box, the system reorders the tags to put the one with the minus first, causing it to fail (which is still a bug). Try "[retag-request] -[status-completed]" in the search box.
    – Jon Seigel
    Apr 9, 2010 at 15:31
  • You are right there, it seems to want to put them in any order it shall please. @jon
    – random
    Apr 9, 2010 at 15:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .