lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ali Syed (JIRA)" <>
Subject [jira] Created: (SOLR-1180) Delete only delta import does not commit index
Date Fri, 22 May 2009 00:59:45 GMT
Delete only delta import does not commit index

                 Key: SOLR-1180
             Project: Solr
          Issue Type: Bug
          Components: contrib - DataImportHandler
    Affects Versions: 1.3
         Environment: OS: Windows & Linux. 
Java: 1.6
DB: MySQL & SQL Server
            Reporter: Ali Syed
            Priority: Minor

Entity is set up in db-data-config.xml as follows

I<entity dataSource="mysqlDS" name="contact" pk="id"
    query="SELECT o.* FROM Contact o WHERE (o.deleted is null OR o.deleted = 0)"
    deltaQuery="select id from Contact o where (o.deleted is null OR o.deleted = 0) AND (o.createDate
&gt; '${dataimporter.last_index_time}' OR o.updateDate &gt; '${dataimporter.last_index_time}')"
    deletedPkQuery="select id FROM Contact o WHERE o.deleted = 1 AND (o.createDate &gt;
'${dataimporter.last_index_time}' OR o.updateDate &gt; '${dataimporter.last_index_time}')">

If a delta import is trigger which causes only documents to be deleted the index is not commit.

Problem seems to be in DocBuilder.execute() method checks for deletedDocCount before commiting.
if (importStatistics.docCount.get() > 0 || importStatistics.deletedDocCount.get() >
0) {

doDelta() method sets the count as follows

but after deleteAll(Set) method removes the each key from iterator
while (...) ...

Simply remove iter.remove() line should fix the problem. I am not sure what is the point of
removing the keys from the iterator.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message