Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 10558 invoked from network); 6 Sep 2010 09:18:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Sep 2010 09:18:02 -0000 Received: (qmail 241 invoked by uid 500); 6 Sep 2010 09:18:01 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 99637 invoked by uid 500); 6 Sep 2010 09:17:58 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 99624 invoked by uid 99); 6 Sep 2010 09:17:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Sep 2010 09:17:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Sep 2010 09:17:54 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o869HXS6000393 for ; Mon, 6 Sep 2010 09:17:33 GMT Message-ID: <28512267.38421283764653187.JavaMail.jira@thor> Date: Mon, 6 Sep 2010 05:17:33 -0400 (EDT) From: "Ephraim Ofir (JIRA)" To: dev@lucene.apache.org Subject: [jira] Created: (SOLR-2104) DIH special command $deleteDocById dosn't skip the document and doesn't increment the deleted statistics MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org DIH special command $deleteDocById dosn't skip the document and doesn't increment the deleted statistics -------------------------------------------------------------------------------------------------------- Key: SOLR-2104 URL: https://issues.apache.org/jira/browse/SOLR-2104 Project: Solr Issue Type: Bug Components: contrib - DataImportHandler Affects Versions: 1.4.1, 1.4 Reporter: Ephraim Ofir Priority: Minor 1. Not sure it's a bug, but looks like a bug to me - if the query returns any values other than $deleteDocById for the row you want deleted, it deletes the row but also re-adds it with the rest of the data, so in effect the row isn't deleted. In order to work around this issue, you have to either make sure no data other than $deleteDocById= exists in rows to be deleted or add $skipDoc='true' (which I think is a little counter-intuitive, but was the better choice in my case). My query looks something like: SELECT u.id, u.name, ... IF(u.delete_flag > 0, u.id, NULL) AS $deleteDocById, IF(u.delete_flag > 0, 'true', NULL) AS $skipDoc FROM users_tb u 2. $deleteDocById doesn't update the statistics of deleted documents. This has 2 downsides, the obvious one is that you don't know if/how many documents were deleted, the not-so-obvious one is that if your import contains only deleted items, it won't be committed automatically by DIH and you'll have to commit it manually. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org