lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zac Smith <>
Subject Using the Data Import Handler with SQLite
Date Sat, 02 Apr 2011 00:56:25 GMT
I hope this question is being directed to the right place ...

I am trying to use SQLite (v3) as a source for the Data Import Handler. I am using a sqllite
jdbc driver (link below) and this works when using with only one entity. As soon as I add
a sub-entity it falls over with a locked DB error: "java.sql.SQLException: database is locked".
Now I realize that you can only have one connection open to SQLite at a time. So I assume
that the first query is leaving a connection open before it moves onto the sub-query. I am
not sure if the issue would be in the jdbc driver or the DIH. It works fine with SQL Server.

Is this a bug? Or something that just isn't possible with SQLite?

Here is a sample of my data config file:
  <dataSource type="JdbcDataSource" 
              url="jdbc:sqlite:SolrImportTest.db" />
    <entity name="locations"
			query="select * from locations">
		<field column="Id" name="Id" />
		<field column="Name" name="Name" />		
		<field column="RegionId" name="RegionId" />
		<entity name="regions"
				query="select * from regions where id = '${locations.RegionId}'"
			<field column="Name" name="RegionName" />

sqllite jdbc driver :

View raw message