Sourcegraph wisely chased the enterprise market, so use it to index your private repositories. Plus it can other things such as finding all definitions and modifying them across multiple repositories. They don’t really exist in the same space, at least yet anyway.
Also there is no money to be made in public code search. Take my word for it. However it is something that all code hosing repository should probably have as a useful too, even if it’s not a direct revenue stream.