What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

As I see search terms in Search used with OR operator by default and I see no way to switch or force it to AND. For example I just queried [XTS mode] in the stackoverflow and all results were irrelevant (the moment before I read a post where both terms were used)

Google always used AND operator by default. As I recall from my experience the noticeable exception is phpBB that uses OR by default. I know that this can be a very long discussion, but the well-known search engines is a strong point on my side, aren't they?

EDIT: I just read about the feature that AND results should be at top. Not always actually, or with this approach (all shown, AND first), suggestion would be at least mark the sections, so to see there's no AND results at all.

I'd say that the search works strangely, two examples:

share|improve this question
add comment

5 Answers

up vote 2 down vote accepted

The new elasticsearch-backed search is using an AND operator by default now.

share|improve this answer
    
Looks very promising, thanks –  Maksee Jan 9 '13 at 7:18
1  
In fact I can't find a way to use an OR operator with the new elasticsearch for those times I do want it )-: –  hippietrail Jan 13 '13 at 1:07
1  
Any OR operator left? The once documented [or] no longer seems to work: Zero search results when searching for [tagOne] [or] [tagTwo]. –  Arjan Jan 27 '13 at 16:27
add comment

I agree. The default OR search is a complete violation of web design guidelines. If the results returned do not include all the terms searched for, this should be communicated to the user in some way.

share|improve this answer
add comment

This is now implemented in a simpler way; just begin each word with a + if it must appear in your results, eg:

+apples +oranges

share|improve this answer
    
Jeff, that's probably a "good enough" solution for StackOverflow users, but what about, say, Cooking users? When was the last time a real search engine required users to use + to do an AND search? 1998? Why not just make all search AND, period? –  devuxer Mar 5 '12 at 19:32
add comment

I agree. My logic is this:

  • Google uses "and", not "or".
  • The vast majority of Internet search goes through Google.
  • Therefore, you should have an extremely good reason for not working like Google does.

Using "or" just confuses people. Having a workaround that allows "and" but isn't documented on the search tips page confuses people even more.

Jeff, could you at least add your answer above to the tips page, please?

share|improve this answer
add comment

Yes, I find this strange as well.

As a work around, you might be interested to know that you can do AND searches if you edit the URL directly:

http://stackoverflow.com/questions/tagged/python+optimization

Will return all questions matching both python and optimization.

share|improve this answer
    
Hmm, the general query in my case produces exactly the same query with pluses, i.e. "wrong" query already has pluses so I don't know what to change in order to get right results :) –  Maksee Sep 17 '09 at 14:28
    
Have you double checked the entire url? When I type "python optimization" into the search box, I get: stackoverflow.com/search?q=python+optimization. This is not the same as the URL in my answer (my url is not a search). –  ire_and_curses Sep 17 '09 at 14:43
    
@ire and curses, the URL in your answer is searching for questions tagged both python and optimization, the URL in the comment searches for posts tagged Python and containing the text optimization. StackOverflow automatically changes some search keywords to search based on tags, (blog.stackoverflow.com/2008/10/… towards the end of the post) –  Nathan Koop Sep 17 '09 at 15:14
1  
@Nathan Koop: Thanks for the clarification. I realise I misunderstood the OP - he is talking about string searches, not tag searches, although he uses the same square bracket syntax in his question. There is no XTS tag on SO. "[Delphi] register" works for the second example –  ire_and_curses Sep 17 '09 at 15:47
add comment

You must log in to answer this question.

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