11

I'm asking because of these comments.. Basically wondering if there's a way to find all php5 questions without the php tag.

If you search for [php5] -[php] it goes to..

http://stackoverflow.com/questions/tagged/-php php5

..which returns results with the php tag (wrong), but if I manually correct the URL to..

http://stackoverflow.com/questions/tagged/php5 -php

..it works perfectly (I removed %20 from the URL for clarity)

  • +1 from me : ) – Ólafur Waage Jul 5 '09 at 22:23
  • 2
    When you type it into the search bar, it probably sorts them, when it really shouldn't. – Brad Gilbert Jul 6 '09 at 15:38
8

The order in which you place the tags matters. If you're searching for questions tagged A and not B, you'll need to put the A before the -B in the search URL:

https://stackoverflow.com/questions/tagged/php5 -php

Though the search exhibits bugish behavior when you place the negative term first, it's possible this is by design. Consider a search for

https://stackoverflow.com/questions/tagged/-this-tag-doesnt-exist

If this-tag-doesnt-exist doesn't exist, then that query would have to return all the questions in the system, a (potentially) costly operation.

There is, however, a bug in the display of the negated tag. Here's how it's supposed to look, according to the blog:

enter image description here

However, here's how it actually looks in my browser (notice the missing "not"):

alt text

You must log in to answer this question.

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