views:

415

answers:

5

How does the search algorithm on stackoverflow work? I need to implement a search functionality in one of my web sites.

A: 

SQL Server Full text search

and as stackoverflow saying:

  • You're browsing through questions matching search terms search stackoverflow
  • Search within specific tags by adding them in brackets, like [tag] or [tag-2].
  • Enclose your search in "quotes" to match a phrase.
  • You can narrow your search by using the ~ (near) and - (not) operators before words.*
Amr ElGarhy
+1  A: 

You should look into Full Text Search:

http://en.wikipedia.org/wiki/SQL_Server_Full_Text_Search

legenden
+2  A: 

Not very well. If you need your site searchable, try adding a Google search box through Adsense (and setting up a sitemap).

chaos
definitely outsource this to Google. It's essentially what we do, since 90% of our traffic is from Google.
Jeff Atwood
A: 

I believe they use the Full Text Search capabilities of SQL Server.

Dan
A: 

Suggesting SQL Server assumes thats the db backend, better to use Lucene or if you dont want to use java there's .Net, C and Ruby ports of the lucene.

Actually i wouldn't be surprised if SO is Lucene.Net based.

Krypes