11

Possible Duplicate:
Advanced Search Options Syntax: Multiple Tags, And Vs. Or

I have looked around meta and found xyz "search tags" questions but could find one that solves my problem and I would appreciate if someone could point me out in direction that could solve my problem.

I am trying following:
I want to search for questions tagged [A] and also (tagged [B] or [C]). So for example I would like to see all questions tagged or that also have been tagged .

Any help will be greatly appreciated!

  • 2
    One quick solution I can think of is temporarily setting your favorite tags to ios and android and then searching user-interface. The posts you're looking for will be highlighted in friendly yellow. – gobernador Jun 22 '12 at 13:36
  • @gobernador: Is it possible not to show the other results, i.e. just show highlighted ones? Such that only the ones from favorite tags show up? – Bo. Jun 22 '12 at 13:40
  • 1
    I can't find any way to do this. +1 for you. – gobernador Jun 22 '12 at 13:45
  • I hope someone does. I really hope. – Bo. Jun 22 '12 at 13:49
  • @kiamlaluno: You have voted to close this question as a duplicate. Could you kindly point me to an answer in the duplicate that shows how to do both AND and OR on tags? – jfs May 15 '14 at 15:51
6

This answer to this question led me to a good answer that I don't believe is a complete solution, but it works. if your tag are A, plus B or C, you would type into the search bar:

https://stackoverflow.com/questions/tagged/A%20B%20OR%20A%20C

Your particular solution will be

https://stackoverflow.com/questions/tagged/user-interface%20android%20OR%20user-interface%20ios

That is, to AND them, include %20, and to OR them, include %20OR%20. The problem with the current situation is that the search bar currently replaces , a space, with + before searching. Therefore, when you type a search, all the words are ANDed together. %20 represents a space in a URL. I don't believe this will change unless the search bar is modified fundamentally.

You can, however, get this functionality in a search bar by going to https://stackoverflow.com/search and using the Google search box. Typing user-interface android OR user-interface ios yields this page, which contains all the questions you're looking for.

EDIT: It appears from this blog post that you can actually type spaces into the address bar, as in

https://stackoverflow.com/questions/tagged/user-interface android OR user-interface ios

rather than messing with the kludgy hex code. I would like to see this changed in the way that the search box works.

| improve this answer | |
7

(A && (B||C)) == ((A&&B) || (A&&C))

If you're using the search box, use the search terms: [A][B] [or] [A][C]. This will redirect you to /questions/tagged/a+b+or+a+c.

Using your example, searching for [user-interface][android] [or] [user-interface][ios] gives us:

Search result


Related post: Search [tag1] OR [tag2]

| improve this answer | |
  • This works too. Thanks for your post. – Bo. Jun 22 '12 at 14:15

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