I put together a demo of this for work where I pulled all our private repos and built an index, then used datasette as the front end.
It was incredibly fast, so much so that I found it more useful than github search. The index is pretty out of date now but I still use it purely based on convenience and speed
https://www.sqlitetutorial.net/sqlite-full-text-search/
https://www.sqlite.org/fts5.html