What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

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)

share|improve this question
    
+1 from me : ) –  Ólafur Waage Jul 5 '09 at 22:23
1  
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

1 Answer 1

up vote 6 down vote accepted

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:

http://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

http://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:

alt text

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

alt text

share|improve this answer
    
stackoverflow.com/questions/tagged/php5%20-php This is exactly what I wanted. Thanks. –  Ólafur Waage Jul 5 '09 at 22:32
    
Aha! It just doesn't work if the -php is first: stackoverflow.com/questions/tagged/-php%20php5 –  dbr Jul 5 '09 at 22:53
    
correct, we don't allow queries to begin with not. –  Jeff Atwood May 15 '10 at 6:48

You must log in to answer this question.

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