You could try to take the code for SynonymFilterFactory as a starting point, and adapt it to obtain the synonym configuration from another source than a text file.
But I'm not sure what you mean by checking for synonyms at query time. As I understand it, Solr works like that anyway - depending on how you configure it. The only difference between your new SynonymFilterFactory and Solr's default would be where it obtains the synonym configuration from. You can get Solr to re-read the configuration by issuing a "reload" command. See http://wiki.apache.org/solr/CoreAdmin#RELOAD. Med venlig hilsen / Best regards Peter Kirk E-mail: mailto:p...@alpha-solutions.dk -----Original Message----- From: Ravi Gidwani [mailto:ravi.gidw...@gmail.com] Sent: 10. januar 2010 16:20 To: solr-user@lucene.apache.org Subject: Synonyms from Database Hi : Is there any work done in providing synonyms from a database instead of synonyms.txt file ? Idea is to have a dictionary in DB that can be enhanced on the fly in the application. This can then be used at query time to check for synonyms. I know I am not putting thoughts to the performance implications of this approach, but will love to hear about others thoughts. ~Ravi. No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.133/2612 - Release Date: 01/11/10 08:35:00