Yep...Take a look at this example. Map your SQL query to the appropriate fields 
in your index. create a directory under called DataImportHandler and reference 
it in your update command using curl or whatever. example
/solr/conf/dataimporthandler


<dataConfig>
 <dataSource type="JdbcDataSource"
      name="bleh"
      driver="net.sourceforge.jtds.jdbc.Driver"
      
url="jdbc:jtds:sqlserver://localhost;databaseName=bleh;responseBuffering=adaptive;"
      user="test"
      password="test"
      onError="skip"/>
 <document>
   <entity name="Entities"
           dataSource="JIEE"
           transformer="DateFormatTransformer"
    query = "SELECT
     EntityUID AS id,
     EntityType AS cat,
     EntityUIDParent AS pid,
     subject AS subject,
     summary AS summary,
     DateCreated AS eventdate,
     Latitude AS lat,
     Longitude AS lng,
     Type AS jtype,
     SupportCategory AS supcat,
     Cause AS cause,
     Status AS status,
     Urgency AS urgency,
     Priority AS priority,
     Coordinate AS coords
     FROM dbo.JIEESearchIndex">

     <field column="id" name="id" />
     <field column="cat" name="cat" />
     <field column="subject" name="subject" />
     <field column="summary" name="summary" />
     <field column="eventdate" name="eventdate"
dateTimeFormat="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"/>
     <field column="lat" name="lat" />
     <field column="lng" name="lng" />
     <field column="coords" name="coords" />
     <field column="jtype" name="jtype" />
     <field column="supcat" name="supcat" />
     <field column="cause" name="cause" />
     <field column="status" name="status" />
     <field column="urgency" name="urgency" />
   </entity>


On Feb 15, 2011, at 6:45 PM, Jason Rutherglen wrote:

> It'd be nice to be able to pass HTTP parameters into DataImportHandler
> that'd be passed into the SQL as parameters, is this possible?

Reply via email to