4

I found this page, while trying to figure out why I can't use the boolean operators AND (conjunction) and NOT (negation), while OR (disjunction) works. (I simply wrote my search query as [PHP] OR [Excel] and then I tried [PHP] NOT [laravel] and it had no affect.)

https://stackoverflow.com/help/searching

After doing a bit of digging, I realized that, in order to use these operators in the search query, you have to use & for conjunction and - for negation.

My question more or less why aren't negation and conjunction described in the link above?

I would suggest changing the subject "OR Operator" to "Boolean Operations" and adding the other two to the list. The help page is in need of revising.

0

1 Answer 1

6

The negation operator is actually described in the page you're linking to, in the very first paragraph:

To exclude results from a tag, term or phrase, prefix it with - in your query: waffles -unicorns finds posts that mention tasty batter-based breakfasts without including mythical creatures, while [laurel] -[hardy] includes only posts pertaining to the first half of the classic comedy couple.

You don't need & for AND; you just type the two terms you're searching for separated by a space. That's exactly how Google works, so users should be familiar with this and it doesn't need further explanation.

2
  • Hmm, I must have missed that! And I didn't know you could just search like that. Thanks for clarifying it.
    – user2506641
    Commented Nov 16, 2016 at 14:41
  • You're welcome. Also, note that on the search results page, there's a link 'Advanced search tips' right next to the Search button, giving you some quick tips about searching.
    – Glorfindel
    Commented Nov 16, 2016 at 14:43

You must log in to answer this question.