[
https://issues.apache.org/jira/browse/SOLR-2492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
James Dyer updated SOLR-2492:
-----------------------------
Attachment: SOLR-2492.patch
This patch increments the # deleted documents once for each call to
$deleteDocById and/or $deleteDocByQuery. Note that it would be even better
(especially with ..byQuery) to get the actual # of deleted documents and
increment by that many.
By incrementing the # deleted documents, "commit" is called at the end of the
run as expected. This fixes the issue of commit not being called and also
causes the # of deleted documents to be reported back to the user. While this
is better than current behavior, the actual # of reported deletions may not be
accurate because a call to $deleteDocById may not actually delete a document.
Likewise a call to $deleteDocByQuery could delete more than 1 document (or
none).
A unit test is provided.
> DIH does not commit if only Deletes are processed
> -------------------------------------------------
>
> Key: SOLR-2492
> URL: https://issues.apache.org/jira/browse/SOLR-2492
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 1.4.1, 3.1, 4.0
> Reporter: James Dyer
> Priority: Minor
> Fix For: 3.2, 4.0
>
> Attachments: SOLR-2492.patch
>
>
> If a DIH run processes deletes using the $deleteDocById and/or
> $deleteDocByQuery special commands, and if no adds or updates get processed
> in the same run, then "commit" is never called. Also, the # of deleted
> documents does not get incremented.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]