Live data from Hacker News

The technology behind GitHub’s new code search

github.blog

11–20 of 187 posts

Re: The technology behind GitHub’s new code search

#12
post #9

I really hope they release this soon and that it’s actually good. The current search sucks ass, you can’t find anything. I was trying to search for something in the WebKit source the other day and I had to use Sourcegraph because the GitHub search gave me zero results.

You can try it right now in our beta. Right now, we are onboarding all signups daily. Sign up here: https://github.com/features/code-search Obvious disclaimer because I work on this (and I also worked on the legacy search): It is way better.

I just signed up to the beta. Looking forwards to trying it out :).

Re: The technology behind GitHub’s new code search

#13

Sourcegraph should’ve accepted that offer from GitHub.

I don't think Sourcegraph is in big trouble here. Their whole play is enterprises, who likely have code spread across many different hosts. On top of that, their code search is still miles ahead of GitHub's.

Re: The technology behind GitHub’s new code search

#15
I really like the new search. Though sometimes it is a bit deceptive. I.e. when searching for a function name by clicking on a piece of code and suddenly you are in an entitely different code base with an unrelated function though it shares the name.

It feels like github code browsing is a step between a full editor with lsp and a static site. I Hope they work out the Kinks and make it more smooth

Re: The technology behind GitHub’s new code search

#17

Blackbird written in Rust is a natural approach. Those who try to sell build the whole thing with a whole thing is unwise (look at you isomorphic javascript)

Isomorphic projects are generally good for full stack apps, but I don’t think anyone would recommend you build a search engine with isomorphic JS.

Re: The technology behind GitHub’s new code search

#18
post #13

Sourcegraph should’ve accepted that offer from GitHub.

I don't think Sourcegraph is in big trouble here. Their whole play is enterprises, who likely have code spread across many different hosts. On top of that, their code search is still miles ahead of GitHub's.

It's very useful for enterprises to have one solution like github. Github isn't the best in every fields, but overall it's the best offer (they have git hosting, continuous integration, bug tracking, discussion forums, hosted dev environment, and now code search). It reminds me of a bundling strategy used in MS Office.

Re: The technology behind GitHub’s new code search

#20
As a comparison to Sourcegraph: Sourcegraph shards and indexes a repository at a time, and uses trigrams and bloom filters (to skip shards).

Github shards and indexes individual files according to their hashes. It also uses variable length ngrams (neat!). This makes horizontal scaling simpler, but also means more of the index needs to be scanned for org/repo-scoped queries ("Due to our sharding strategy, a query request must be sent to each shard in the cluster.").

Post reply on HN