this relates pretty much directly to a seperate ongoing thread about making the update mechanism more general to support differnet types of "input streams" then just XML...
http://www.nabble.com/Re%3A-Handling-disparate-data-sources-in-Solr-tf2918621.html ...tackling an approach like that, with an "out of the box" DbUpdateRequestHandler that could be configured with a JDBC refrence and a prepared statement string might be the best avenue to persue instead of adding DB specific code to the existing SolrUpdateServlet or SolrCore. : Date: Wed, 10 Jan 2007 22:32:54 -0800 : From: Ryan McKinley <[EMAIL PROTECTED]> : Reply-To: solr-dev@lucene.apache.org : To: solr-dev@lucene.apache.org : Subject: SQL UpdatePlugin? : : I'd like to be able to add/update documents from an SQL query. Perhaps: : : <addFromSQL : mode="add or replace fields" : connection="jdbc:mysql://localhost/nblmc?username=xxx&password=xxx" : driver="com.mysql.jdbc.Driver" : multifieldSeperator="\n" > : SELECT * FROM my_stats_table : </addFromSQL> : : This would use the the column names as the field name, and the cell : value.toString() as the field value. : : If the schema says the field can have multiple values AND a : multifieldSeperator is defined, it will split the value on that : string. : : To get intended results, you may need to use the 'AS' command and : perhaps format the cells using SQL. For example: : : SELECT itemID AS id, name, DATE_FORMAT( addedTime, '%Y-%m-%dT%H:%i:%s.000Z' ) : : Should this be an implemented as an Update Plugin? or added directly : to the DirectUpdateHandler. : : If it should be an UpdatePlugin, how do i get started? : : thanks : ryan : -Hoss