tags:

views:

517

answers:

1

Hi all,

There is a problem when I use solr1.3 delta-imports to update the index. I have added the "last_modified" column in the table. After I use the "full-import" command to index the database data, the "dataimport.properties" file contains nothing, and when I use the "delta-import" command to update index, the solr list all the data in database not the lasted data. My db-data-config.xml:

deltaQuery="select shop_id from shop where last_modified > '${dataimporter.last_index_time}'">


<?xml version="1.0" encoding="UTF-8" ?>
<dataConfig> 
  <dataSource driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/funguide" user="root" password="root"/>   
   <document name="shopinfo"> 
     <entity name="shop" pk="shop_id"
             query="select shop_id,title,description,tel,address,longitude,latitude from shop" 

                    <field column="shop_id" name="id" />
                    <field column="title" name="title" />
                    <field column="description" name="description" />
                    <field column="tel" name="tel" />
                    <field column="address" name="address" />
                    <field column="longitude" name="longitude" />
                    <field column="latitude" name="latitude" />

     </entity>
  </document>
</dataConfig>

Anyboby know how to solve the problem? Thanks!

[email protected]

A: 

I also would recommend upgrading to Solr 1.4 RC as there have been quite a few improvements made to delta-imports with DataImportHandler. Please see DataImportHandler - Using delta-import command - wikipage for specifics.

Brian Mansell