14

Before the new nav, it was possible to use the search box to require some tags and exclude others. Typing something like [included-tag] -[excluded-tag] would bring up results that included and excluded the respective tags. Here's an example on ELL, which was made with the search [word-request] -[phrase-request].

In the new nav, typing only tags in the search area ignores the - modifier. So typing [master] -[slave] is somehow reinterpreted into [master] [slave] (notice the negation - is now gone). In order to work around this, I have to include some extra non-tag search criteria. A search like [master] -[slave] is:question seems to work as intended. But if you remove the is:question from the search box (or the url) it fails to handle the tags properly.

Please fix the new tag behavior to support the old tag-exclusion behavior without having to resort to weird workarounds.

This question is a more detailed version of this related feature request.

1
  • I think I'm seeing this, also. I'm trying to use advanced search to exclude certain tags. For example, say I want all question not tagged elephant. The help suggests that '-[elephant]' should work, but that appears instead to find all stories that include the phrase elephant but are not tagged elephant.
    – Mark Olson
    Dec 19, 2017 at 13:34

2 Answers 2

10

Yeah, seems that the new nav search simply doesn't function correctly, I've noticed that too. What do we do, until it's fixed? Choose some ugly workarounds (unfortunately) that will lead us to the "old search engines", like this:

[android]-[java] is:

It will show the results you want, including both questions and answers.

And if you want only questions, is:question is too long anyway :) Use is:q.

2
  • Yeah, I've had to resort to this. Although, since I'm usually searching for questions, is:question is what I usually use.
    – ryanyuyu
    Jul 2, 2015 at 13:27
  • 1
    @rya in this case, is:q is shorter :)
    – nicael
    Jul 2, 2015 at 13:30
6

With the latest iteration, excluded tags are now differently broken.

On Stack Overflow, I want to see posts that have the [c#] tag but not the [.net] tag. Should be easy, right? Type [c#] -[.net] in the search box.

But no. I'm using the .

I get directed to this page. Funny, I thought there'd be more hits.

0 questions tagged <code>-[.net] [c#]</code>

But wait...

5 questions with new activity

The new questions tagged [c#] but not [.net] are getting fed correctly!

That's not all. I click “Reload”. I get redirected to this other page — questions tagged [c#] or [.net]. And the search box now contains [.net] [c#]. Somehow reloading the page dropped that - in front of .net in the URL.

You must log in to answer this question.

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