21

Stack Overflow search engine has gone through numerous improvements over the years and in effect is quite useful. Its sorting and filtering capabilities are outstanding but when it comes to fulltext search Google still has the upper hand.

For example, a Python-related native search for

getpreferredencoding

returns no matches.

In contrast, Google does a lot better and comes up with 22 hits for

getpreferredencoding site:stackoverflow.com

To get at least somewhat similar results with native search (currently 19 hits) one has to be a lot wordier and use something along the lines of

locale.getpreferredencoding()

It seems that Google is smarter in defining word boundaries, especially when it comes to source code.

Would it be possible (and reasonable) to upgrade SO search to include common code punctuation as word delimiters?

PS. This isn't about beating Google but rather having a more accurate native search.

3

Possible? Yes.

Reasonable? Probably not. They've already farmed the searching off to Lucene.NET, so it's likely going to depend on what Lucene.NET is able to do. However, I'm not really familiar with Lucene.NET, so I absolutely can't say.

Also, keep in mind, Google is in the business of finding stuff (that they can serve ads on) and SEI is in the business of getting you to ask and answer questions. Jeff has said many times before that he wants Google to be your entry point to the stacks, and I know that right now that is the focus.

1

I had a think about this and support this with a few caveats.

If we always split on ,[(;. and so on we may actually hurt the search results.

For example: "asp.net" is a tag ... we do not want to split that particular word cause it could cause us to get lower quality asp.net search results and flood the results with "net" and "asp" results.

If we can figure out how to amend the search algorithm so it does not split tags but does split the rest, I think this could work.

You must log in to answer this question.