Re: Indexing from a database via SolrJ

2011-08-16 Thread Shawn Heisey
On 8/16/2011 1:12 PM, Shawn Heisey wrote: On 8/16/2011 11:23 AM, Erick Erickson wrote: The problem with anything "automatic" is that I don't see how it could know which fields in the document to map DB columns to. Unless you had fields that exactly matched column names, it would be iffy... I a

Re: Indexing from a database via SolrJ

2011-08-16 Thread Shawn Heisey
On 8/16/2011 11:23 AM, Erick Erickson wrote: The problem with anything "automatic" is that I don't see how it could know which fields in the document to map DB columns to. Unless you had fields that exactly matched column names, it would be iffy... I assume DIH actually does something like this,

Re: Indexing from a database via SolrJ

2011-08-16 Thread Erick Erickson
The problem with anything "automatic" is that I don't see how it could know which fields in the document to map DB columns to. Unless you had fields that exactly matched column names, it would be iffy... I assume DIH actually does something like this, but don't know any way of having SolrJ automag

Re: Indexing from a database via SolrJ

2011-08-16 Thread Shawn Heisey
On 8/16/2011 7:14 AM, Erick Erickson wrote: What have you tried and what doesn't it do that you want it to do? This works, instantiating the StreamingUpdateSolrServer (server) and the JDBC connection/SQL statement are left as exercises for the reader.: while (rs.next()) { SolrInputD

Re: Indexing from a database via SolrJ

2011-08-16 Thread Erick Erickson
What have you tried and what doesn't it do that you want it to do? This works, instantiating the StreamingUpdateSolrServer (server) and the JDBC connection/SQL statement are left as exercises for the reader .: while (rs.next()) { SolrInputDocument doc = new SolrInputDocument(); S

Re: Indexing from a database via SolrJ

2011-08-15 Thread Shawn Heisey
On 8/15/2011 5:55 PM, Arcadius Ahouansou wrote: Hi Shawn. Unles you are doing complex pre-processing before indexing, you may want to have a look at: http://wiki.apache.org/solr/DataImportHandler#Usage_with_RDBMS That should take care of it without any coding. You may need to periodically do a

Re: Indexing from a database via SolrJ

2011-08-15 Thread Arcadius Ahouansou
Hi Shawn. Unles you are doing complex pre-processing before indexing, you may want to have a look at: http://wiki.apache.org/solr/DataImportHandler#Usage_with_RDBMS That should take care of it without any coding. You may need to periodically do a HTTP GET to trigger the import. Arcadius. On M