lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zac Smith <...@trinkit.com>
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:
<dataConfig>
  <dataSource type="JdbcDataSource" 
              driver="org.sqlite.JDBC"
              url="jdbc:sqlite:SolrImportTest.db" />
  <document>
    <entity name="locations"
			pk="id"
			query="select * from locations">
		<field column="Id" name="Id" />
		<field column="Name" name="Name" />		
		<field column="RegionId" name="RegionId" />
		<entity name="regions"
				pk="id"
				query="select * from regions where id = '${locations.RegionId}'"
			<field column="Name" name="RegionName" />
		</entity>
    </entity>
  </document>
</dataConfig>

sqllite jdbc driver : http://www.zentus.com/sqlitejdbc/

Mime
View raw message