4

I want to execute the following search on Stack Overflow:

Give me all questions that are either related to [rider] or to unit testing with C# ([c#] and [nunit], [xunit] or [unit-testing]).

This is my search string:

(([xunit] OR [nunit] OR [unit-testing]) AND [c#]) OR [rider]

It returns exactly one result, which confuses me - there are much more questions on Stack Overflow matching these criteria.

So I assume that either my search string is wrong or not supported.

Any ideas?

8
  • 3
    SO search is simply not that intelligent. Commented May 19, 2022 at 14:06
  • I don't think the search function supports parentheses for such logic. You'd be better off using a few ORs and then adding watched tags to highlight the one's you want to look at. maybe [xunit] OR [nunit] OR [unit-testing] OR [rider] and have [rider] and [c#] as your watched tags. Commented May 19, 2022 at 14:07
  • 1
    It's much better to use site:StackOverflow.com and do a search from the web. Commented May 19, 2022 at 14:07
  • 2
    @Larnu It does support parentheses, just not to that level, and IIRC you need to have spaces around the parentheses too, so ( ( [xunit] OR [nunit] OR [unit-testing] ) AND [c#] ) works as you'd expect, but I don't believe it can do the OR [rider] in addition to that. Commented May 19, 2022 at 14:08
  • Okay, thank you! Do you know whether there are plans to build a more sophisticated search that would support these SQLish expressions? Commented May 19, 2022 at 14:21
  • It seems to work with ( [xunit] or [nunit] or [unit-testing] or [rider] ) and ( [C#] or [rider] ) Commented May 19, 2022 at 14:38
  • Awesome @Damien, that seems to give me the expected results 🥳 would you please provide it as an answer? Commented May 19, 2022 at 14:42
  • 1
    @MarkBenningfield for general content searching yes, but for specific tag-based queries, no Google is actually not as good, because it doesn't have direct support for classifying questions by tags like Stack Overflow does Commented May 19, 2022 at 16:22

1 Answer 1

6

Because of the limitations of the search engine, you have to limit parenthesis nesting.

In your case, it seems to work with :

 ( [xunit] or [nunit] or [unit-testing]  or [rider] )  and ( [C#]  or [rider] )
2
  • Today I learned that imbrication is a word. So essentially... don't nest parentheses? Commented May 19, 2022 at 15:58
  • 1
    @Gimby I am not so good at English. imbrication is correct in French ... and the word exists in English. So I used it. nesting is certainly more usual. I will modify the text. Commented May 19, 2022 at 16:02

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.