I've recently ran into debian code search again, https://codesearch.debian.net/. Built on top of Russ Cox's Code search (https://github.com/google/codesearch), and quite well documented.
Can't say I've used it much, but it gives a few pointers into how you could build a better one yourself.