What’s up with StackOverflow search?

I was recently had a strange experience while introducing a colleague to the magic of StackOverflow – what an amazing website. They arrived on the scene and showed us how Q&A should be done – I’m a big fan. However, I tried to search for a question I knew I had seen before – regarding namespaces in JavaScript – and for some reason I couldn’t find it.

I changed my search query around, swapped the word order around, tried a few different things, but each search results seemed to return more confusing – yet different – results.

The first query I tried was ‘javascript namespaces’.

search

Weird… I was sure there was one very popular question that had the proper answers. It definitely had more than 1 vote!

So I tried a different query – ‘javascript namespace declaration’.

search

Ok, more weirdness – completely different results and they all have the same titles!

I tried to be a bit more verbose – ‘how to declare namespaces in javascript’.

search

That’s not what I want…

What does Google say?

Try the following queries in Google:

  1. javascript namespaces site:stackoverflow.com
  2. javascript namespace declaration site:stackoverflow.com
  3. how to declare namespaces in javascript site:stackoverflow.com
  4. javascript namespaces
  5. javascript namespace declaration
  6. how to declare namespaces in javascript

Every single one of those queries return this page – which is the one I was originally searching for! What is going on with StackOverflow search?

I originally wanted to post a question like this on the meta site, but I did a quick search to see if there already was such a question, and of course there was – more than one in fact (the meta site uses the same search functionality). It seems like search functionality in StackOverflow means that users can often not find the existing question they are looking for – and end up asking the same question again.

So there are 2 forces at work here – the search functionality not returning the page I’m after and the existence of duplicate questions. The search functionality I would guess is due to a leaky search engine, but the duplicate questions is almost a social issue.

StackOverflow is geared towards rewards, but users are not really rewarded for flagging questions as duplicates – in fact, the opposite is true. If I know the correct answer to a question and I see 5 users asking the same question it’s better for my reputation rating to answer all 5 and get the rewards from all 5 questions than flagging them as duplicates. In reality it’s a bit more complicated than that, but in my experience this is pretty much what happens. At the moment this issue is probably not very visible because most users arrive at StackOverflow via a Google search – which tends to have much better (and consistent) results.

I’m not saying that all similar questions should be closed down – not at all. You and I might have similar questions but the details lead to 2 completely (or contradictory) answers – there’s nothing wrong with that. However StackOverflow functions as both a QA and reference site. It simply seems to me that the current system will lead to more and more duplicate posts, which in the long term could threaten the success of this amazing website.

I certainly hope this issue is addressed, and soon – I would hate to see future developers (and myself!) deprived of this resource.