You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by ranjitr <co...@yahoo.com> on 2009/06/28 08:14:02 UTC

Loading Index synonyms from database

Hello,

I was wondering if there was an option to initialize Solr server with
synonyms pulled from a database while indexing documents? At the moment, the
only option seems to be to use a flat file.

Thanks.
-- 
View this message in context: http://www.nabble.com/Loading-Index-synonyms-from-database-tp24239069p24239069.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Loading Index synonyms from database

Posted by Chris Hostetter <ho...@fucit.org>.
: I was wondering if there was an option to initialize Solr server with
: synonyms pulled from a database while indexing documents? At the moment, the
: only option seems to be to use a flat file.

loading from a text file was implemented because it was very generic and 
universal (almost anyone can create a text file)

when you talk about loading synonyms from a DB things get less generic -- 
at aminimum you need config options for indicating where the DB is and how to 
connect to it, but you also need to configure how to extract synonym 
sequences from your database.

it's the kind of things that tends to be easier to write as a one off for 
you particular use case then it is to try and implement genericly to provide 
for all solr users -- just write your own DataBaseSynonymFilterFactory 
that loads the synonyms from your db using your custom logic and then 
constructs the SynonymFilter objects like the existing factory.




-Hoss