Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 17815 invoked from network); 25 Aug 2009 09:54:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Aug 2009 09:54:57 -0000 Received: (qmail 17680 invoked by uid 500); 25 Aug 2009 09:55:21 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 17596 invoked by uid 500); 25 Aug 2009 09:55:21 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 17321 invoked by uid 99); 25 Aug 2009 09:55:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2009 09:55:21 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2009 09:55:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 63FB9234C1EB for ; Tue, 25 Aug 2009 02:54:59 -0700 (PDT) Message-ID: <1865238302.1251194099408.JavaMail.jira@brutus> Date: Tue, 25 Aug 2009 02:54:59 -0700 (PDT) From: "Noble Paul (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Resolved: (SOLR-1229) deletedPkQuery feature does not work when pk and uniqueKey field do not have the same value In-Reply-To: <753636878.1245333308054.JavaMail.jira@brutus> 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 [ https://issues.apache.org/jira/browse/SOLR-1229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Noble Paul resolved SOLR-1229. ------------------------------ Resolution: Fixed committed :r807537 > deletedPkQuery feature does not work when pk and uniqueKey field do not have the same value > ------------------------------------------------------------------------------------------- > > Key: SOLR-1229 > URL: https://issues.apache.org/jira/browse/SOLR-1229 > Project: Solr > Issue Type: Bug > Components: contrib - DataImportHandler > Affects Versions: 1.4 > Reporter: Erik Hatcher > Assignee: Erik Hatcher > Fix For: 1.4 > > Attachments: SOLR-1229.patch, SOLR-1229.patch, SOLR-1229.patch, SOLR-1229.patch, SOLR-1229.patch, SOLR-1229.patch, tests.patch > > > Problem doing a delta-import such that records marked as "deleted" in the database are removed from Solr using deletedPkQuery. > Here's a config I'm using against a mocked test database: > {code:xml} > > > > pk="board_id" > transformer="TemplateTransformer" > deletedPkQuery="select board_id from boards where deleted = 'Y'" > query="select * from boards where deleted = 'N'" > deltaImportQuery="select * from boards where deleted = 'N'" > deltaQuery="select * from boards where deleted = 'N'" > preImportDeleteQuery="datasource:board"> > > > > > > > {code} > Note that the uniqueKey in Solr is the "id" field. And its value is a template board-. > I noticed the javadoc comments in DocBuilder#collectDelta it says "Note: In our definition, unique key of Solr document is the primary key of the top level entity". This of course isn't really an appropriate assumption. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.