The best way to do this I think is to pre-generate code / data from the project. You can do this by writing some templates which produce code you need / data you can use at runtime for the purpose of your generic search engine. With a few template statements you can already produce the data you need I think.