I think regular sync of database table with synonym text file seems to be simplest of the solutions. It will allow you to use Solr natively without any customization and it is not very complicated operation to update synonyms file with entries in database.
> >