Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2A1239A66 for ; Sat, 18 Feb 2012 01:58:31 +0000 (UTC) Received: (qmail 79907 invoked by uid 500); 18 Feb 2012 01:58:29 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 79849 invoked by uid 500); 18 Feb 2012 01:58:29 -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 79842 invoked by uid 99); 18 Feb 2012 01:58:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Feb 2012 01:58:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Feb 2012 01:58:26 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 958271BDAC0 for ; Sat, 18 Feb 2012 01:58:05 +0000 (UTC) Date: Sat, 18 Feb 2012 01:58:05 +0000 (UTC) From: "Adam Lane (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <1436689654.53146.1329530285613.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1131605726.46120.1321666852049.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (SOLR-2907) java.lang.IllegalArgumentException: deltaQuery has no column to resolve to declared primary key pk='ITEM_ID, CATEGORY_ID' 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-2907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210748#comment-13210748 ] Adam Lane commented on SOLR-2907: --------------------------------- FYI: Found an alternate way of doing delta here in this thread that is much faster. Please refer to this until the bug is fixed or wiki pages are changed. https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201008.mbox/%3C9F8B39CB3B7C6D4594293EA29CCF438B01702F22@ICQ-MAIL.icq.il.office.aol.com%3E > java.lang.IllegalArgumentException: deltaQuery has no column to resolve to declared primary key pk='ITEM_ID, CATEGORY_ID' > ------------------------------------------------------------------------------------------------------------------------- > > Key: SOLR-2907 > URL: https://issues.apache.org/jira/browse/SOLR-2907 > Project: Solr > Issue Type: Bug > Components: contrib - DataImportHandler, Schema and Analysis > Affects Versions: 3.4 > Reporter: Alan Baker > > We are using solr for our site and ran into this error in our own schema and I was able to reproduce it using the dataimport example code in the solr project. We do not get this error in SOLR 1.4 only started seeing it as we are working to upgrade to 3.4.0. It fails when delta-importing linked tables. > Complete trace: > Nov 18, 2011 5:21:02 PM org.apache.solr.handler.dataimport.DataImporter doDeltaImport > SEVERE: Delta Import Failed > java.lang.IllegalArgumentException: deltaQuery has no column to resolve to declared primary key pk='ITEM_ID, CATEGORY_ID' > at org.apache.solr.handler.dataimport.DocBuilder.findMatchingPkColumn(DocBuilder.java:849) > at org.apache.solr.handler.dataimport.DocBuilder.collectDelta(DocBuilder.java:900) > at org.apache.solr.handler.dataimport.DocBuilder.collectDelta(DocBuilder.java:879) > at org.apache.solr.handler.dataimport.DocBuilder.doDelta(DocBuilder.java:285) > at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:179) > at org.apache.solr.handler.dataimport.DataImporter.doDeltaImport(DataImporter.java:390) > at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:429) > at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408) > I used this dataConfig from the wiki on the data import: > > > > query="select * from item" > deltaImportQuery="select * from item where ID=='${dataimporter.delta.id}'" > deltaQuery="select id from item where last_modified > '${dataimporter.last_index_time}'"> > query="select CATEGORY_ID from item_category where ITEM_ID='${item.ID}'" > deltaQuery="select ITEM_ID, CATEGORY_ID from item_category where last_modified > '${dataimporter.last_index_time}'" > parentDeltaQuery="select ID from item where ID=${item_category.ITEM_ID}"> > > query="select DESCRIPTION as cat from category where ID = '${item_category.CATEGORY_ID}'" > deltaQuery="select ID from category where last_modified > '${dataimporter.last_index_time}'" > parentDeltaQuery="select ITEM_ID, CATEGORY_ID from item_category where CATEGORY_ID=${category.ID}"/> > > > > > > To reproduce use the data config from above and set the dataimport.properties last update times to before the last_modifed date in the example data. I my case I had to set the year to 1969. Then run a delta-import and the exception occurs. Thanks. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org