How Google Code Search Worked
swtch.com
How Google Code Search Worked
1–10 of 47 posts
Re: How Google Code Search Worked
#2Re: How Google Code Search Worked
#3Re: How Google Code Search Worked
#4I sometimes wonder whether Russ Cox is actually human or is in fact a collective pen name for a group of very talented hackers :)
Re: How Google Code Search Worked
#5Re: How Google Code Search Worked
#6My guess is that regular expression search is not as useful as full-text search that general Google Search does.
Re: How Google Code Search Worked
#7Essentially I took the regex such as [cb]at and then expand it out to get all of the terms, in this case cat and bat and then do a standard fulltex search based on those terms to get as close a match as possible. I then loop over the results to get back those which are exact matches.
Its actually more complex then that but with some other trickery (infix and prefix indexing) but it works reasonably well although I am still ironing out some kinks.
Re: How Google Code Search Worked
#8Re: How Google Code Search Worked
#9It's a nice design (in particular Trigram Index), but overall product still failed. My guess is that regular expression search is not as useful as full-text search that general Google Search does.
Re: How Google Code Search Worked
#10Yeah, code search is a niche market numerically speaking, but intellectually and economically (considering the economic impact of software) it is vital. Google was doing so much better a job of it than anybody else that they completely owned the space. How could that not be worth what it cost them to run it? And now we are bereft of anything good.
I used to use Google Code Search like this: encounter an unfamiliar language or API construct, go to code search, get page after page of real-world usages. Or like this: wonder how to do X, imagine what code that does X might say, search for snippets of that until hitting a working example of X. It was a powerful learning device that I am sad to lose. I sure hope a startup comes along to get search right for the world's source code. Github ought to, but their search sucks.
In any case, congratulations Russ Cox et. al. on a brilliant piece of work.