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 would like to do a search on stackoverflow for all questions tagged:

([concurrent] or [multithreading]) and ([c] or [c++])

I'd even be happy if I could do a search for ([c] or [c++]) and [multithreading].

But I can't figure out the syntax.

Edit: part of the problem (as pointed out be @Hugo) is that the box in the upper right corner that tells you what you queried doesn't parenthesize correctly. Querying ([c] or [c++])[multithreading] is:question (which really returns the right thing) says it returns:

enter image description here

(which is the same picture you'll get if you query [c] or ([c++][multithreading])!

Edit 2: A second part of the problem is that the or operator seems to behave differently than the [or] operator. Sometimes one works, sometimes not, sometimes the other. A third part of the problem is that adding the is:question qualifier seems to dramatically change the results. (See the comments below @Hugo's answer.)

I've tried [multithreading]([c] or [c++]) (and ([c] or [c++]) [multithreading]) but get questions tagged [c] or ([c++] and [multithreading]).

I've tried [multithreading]([c] [or] [c++]) bug got questions tagged ([multithreading] and [c]) or [c++].

I've tried [c][multithreading] or [c++][multithreading] but get questions tagged [multithreading] or ([c++] and [c] and [multithreading])???

On the other hand [c][multithreading] [or] [c++][multithreading] seems to work but [c][multithreading] [or] [c++][multithreading] is:question returns nothing.

Even stranger querying [multithreading][c] or [multithreading][c++] gives questions tagged [c] or ([multithreading] and [multithreading] and [c++]) (yes, [multithreading] twice!)

How do I do a search that involves both "and" and "or" operators? Is there a predictable syntax I should be using?

share|improve this question
    
@Telthien: I orginally had this as [support] but changed it to [bug] when it became clear (as I discussed it with the answerer, and did my edits) that there are a lot of serious problems with the search feature. You changed it back to [support], so you must disagree. What should I do to report the bugs? –  Wandering Logic Apr 11 '13 at 18:44
    
My reasoning for changing it to support was, even though this reveals bugs in the system, it's technically a support question ("How d o I do a..."). If you have found bugs, you can start a new question to report them, though! –  Emrakul Apr 11 '13 at 18:45

1 Answer 1

up vote 6 down vote accepted

Searching [multithreading]([c] or [c++]) is:question does work. But it does need the is:question else the search results are completely non-relevant.

Here are some results (in the search) that I found that corresponds to borderline cases :

I think these covers all the possible case of what you wanted.


([concurrent] or [multithreading])([c] or [c++]) is:question seems to work as expected also. (With the is:question only, else it does not work.)


Your parenthesis are wrong I think. It's written [c] or [c++][multithreading] which seems to mean ([c] or [c++])[multithreading]. The ORs seem to have precedence over the ANDs (in the UI)

When you put this ([concurrent] or [multithreading])([c] or [c++]) it outputs [concurrent] or [multithreading][c] or [c++]. And the precedence goes to ORs, as you can see because of the search results covering all possible cases.

share|improve this answer
    
Interesting that adding is:question gets the right result (even though the box on the right still says you are getting [c] or ([c++] and [multithreading]). Why? –  Wandering Logic Apr 11 '13 at 17:03
    
@WanderingLogic I've edited! I do think it's just because they don't output parenthesis. –  Hugo Dozois Apr 11 '13 at 17:06
    
Okay, even more bizarre. [c][multithreading] [or] [c++][multithreading] (note the brackets around or) works (the box on the right actually is correct in this case too.) But: [c][multithreading] [or] [c++][multithreading] is:question returns nothing! –  Wandering Logic Apr 11 '13 at 17:07
    
@WanderingLogic this one is weird ! Really don't know why! –  Hugo Dozois Apr 11 '13 at 17:08
    
I see what you mean about them not outputting the parens, but there is still something very broken here. [multithreading]([c] or [c++]) (no is:question) really is outputting [c] or ([c++] and [multithreading]). The first 6 results have nothing to do with either multithreading or c++ stackoverflow.com/questions/tagged/…. –  Wandering Logic Apr 11 '13 at 17:15
    
@WanderingLogic that's effectively weird u_U! –  Hugo Dozois Apr 11 '13 at 17:20

You must log in to answer this question.

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