Until a solution to the search issue is found, gogs can include an option git grep search feature. Like this
https://github.com/tomas/gogs/commit/7746344201d6aad808b0027642ccdcd58d3984fe. Yes, its not fast enough when you have lots of repos, but atleast something until a proper solution is found.
Also, it can help get initial user feedback over search features (format of the queries), positioning in templates, etc. before actually working on the actual thing.
Just a suggestion @Unknwon