lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gora Mohanty <>
Subject Re: Solr indexing process: keep a persistent Mysql connection throu all the indexing process
Date Tue, 23 Aug 2011 18:11:02 GMT
On Tue, Aug 23, 2011 at 10:25 PM, samuele.mattiuzzo <> wrote:
> I wrote my custom update handler for my solr installation, using jdbc to
> query a mysql database. Everything works fine: the updater queries the db,
> gets the data i need and update it in my documents! Fantastic!
> Only issue is i have to open and close a mysql connection for every document
> i read. Since we have something like 10kk indexed document, i was thinking
> about opening a mysql connection at the very beginning of the indexing
> process, keeping it stored somewhere and use it inside my custom update
> handler. When the whole indexing process is complete, the connection should
> be closed.

If you are using a custom update handler, then I imagine that
it is up to you to keep a persistent connection open.

You could also consider using the Solr DataImportHandler, . This can
interface with mysql, and does keep a persistent connection


View raw message