336

I have noticed a thing while asking new questions. I often try searching SO for the answer for some time. With no success, I try and write the title in the Ask Question page, and what do you know, the answer appears magically.

Today I finally managed to come across a reasonable example of this. My question's title was "Finding the next sibling that matches a query".

Here are the search results for that string:

Imgur

And so on. However, inputting that in the Ask Question title box is a whole different story:

Imgur

Here, the first link answers my question.

I know the normal search finds posts based on them containing the search terms. But how does the "this question might exist" search find the results so much better?

I believe this kind of search, as it seems to work better than the normal one in most cases, should at least exist in the normal search options, if not be the default one.

Any opinions?

17
  • 166
    I don't know but I've often noticed this myself. I actually quite regularly just skip the search entirely and start typing my question as if I were going to ask it. 99% of the time I end up finding what I'm looking for that way. I never really thought about it before, but I wonder if this is the tip of the iceberg on a bigger issue...
    – Jason C
    Commented Aug 10, 2014 at 18:21
  • 1
    I don't often get good results from that list that appears from simply entering a title, but the list on the right-hand side of the ask-a-question screen is very, very good.
    – Ben Voigt
    Commented Aug 10, 2014 at 21:11
  • 94
    This has been discussed in meta: meta.stackexchange.com/questions/187773/… How did I find it? I started writing a feature request. :)
    – Davidmh
    Commented Aug 10, 2014 at 21:36
  • 2
    I have posted a feature request documenting this: meta.stackexchange.com/questions/237855/…
    – Davidmh
    Commented Aug 10, 2014 at 22:22
  • 1
    This happens to me and I thought it was because I would try to use the search engine like this: "c# string string", trying to be clever and remove superfluous words, but I would write a question like "What's the difference between String and string?". I figured that the more English language structure in the question, the better the search could understand it.
    – DaveShaw
    Commented Aug 10, 2014 at 23:16
  • 7
    Searching works better if you include a tag and get rid of unnecessary words: [jquery] next sibling
    – cimmanon
    Commented Aug 10, 2014 at 23:40
  • 36
    I've been most successful finding answers via the site:stackoverflow.com feature of my web search engine. Commented Aug 11, 2014 at 0:04
  • 1
    I've noticed the same thing since a long time. I skip the search and search in the title field now. Commented Aug 11, 2014 at 12:29
  • 54
    I usually search on Google. If StackOverflow has an answer, it will be at the top anyway. And if another site has the answer, then I still have my answer.
    – GolezTrol
    Commented Aug 11, 2014 at 12:55
  • May be two different stored procedure running a bit different search logic against DB.
    – Rahul
    Commented Aug 11, 2014 at 17:14
  • 1
    My guess is that the "this question might exist" search is tolerant while the regular search is strict (all words you're searching for have to exist in a result). By the way: I guess google does this "tolerant" search (with a couple of amazing algorithms of course) which sometimes is annoying: when you strictly want the result to contain a specific word it's hard to force that (even with the infamous "+" in front.) -- In the end I guess it's a UX question whether or not a search should be (somewhat) tolerant.
    – leemes
    Commented Aug 11, 2014 at 17:21
  • 1
    Can it be because the search takes the text of your own question into account? There are mathematical models that can measure how "similar" two texts are to each other. By the way, if my guess is wrong, comparing the whole texts of questions can become an interesting feature request.
    – Alexey
    Commented Aug 12, 2014 at 9:52
  • @Alexey: The OP hasn't provided any text body to his question, yet, I would guess. At least that's how I start writing a new question: by the title. And that's when the result already start popping up.
    – Oliver
    Commented Aug 12, 2014 at 11:38
  • Customize your search query
    – user2140173
    Commented Aug 12, 2014 at 11:44
  • @GolezTrol From my experience Google will find the answer over 95% of the time, but when it doesn't, the "this question might exist" search is often more successful. Edit: The reason for this is probably that Google limits the number of results from a single domain.
    – user267817
    Commented Aug 12, 2014 at 17:30

1 Answer 1

17

I don't think this is mysterious at all. If you consider the search "Finding the next sibling that matches a query" then the first hit contains all the search phrase words in the body. If you perform the same search in "Ask Question", the result is those questions that contains most of the search words in the title.

So regular Stack Overflow search primarily searches in answer or question bodies. "Ask Question"-search searches in question titles only.

The title search is not necessarily "so much better", but seen from a questioners point of view the title search will more frequently match what the questioner is about to ask.

I do not think SO should change this procedure. Finding questions with matching or similar titles may prevent duplicates, and is a great last minute tool for the questioner. But for the common searching user, looking for a good answer, a reduced title search would be useless.

However, I do think SO should improve their "advanced search". You cannot replicate the "Ask Question" search with title. title seems to accept one single word only. Example title:finding gives 18784 results - title:finding the returns 0 results.

3
  • 6
    Put your search query in quotes, eg title:"finding the" gives loads of results. Commented May 12, 2015 at 16:06
  • 2
    I know it's an infinite debate, but every SO user I asked just don't use the search field because it appears to be broken. Just consider the upvote count in this question. I think a good solution would be to expand the field when focus, and show a checkbox with title only in it.
    – Martin
    Commented Sep 29, 2015 at 14:23
  • 5
    Wouldn't it be better to provide a "Search by title/body" at this point? It would be more effective and less "broken"... It's really annoying that I need to pretend to ask a new question to search for something...
    – Markon
    Commented Nov 6, 2015 at 9:32

You must log in to answer this question.

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