Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 54E36DFA5 for ; Thu, 6 Sep 2012 14:03:35 +0000 (UTC) Received: (qmail 20393 invoked by uid 500); 6 Sep 2012 14:03:31 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 20339 invoked by uid 500); 6 Sep 2012 14:03:31 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 20329 invoked by uid 99); 6 Sep 2012 14:03:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2012 14:03:31 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [207.211.31.76] (HELO service93-us.mimecast.com) (207.211.31.76) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2012 14:03:24 +0000 Received: from ingramcontent.com (nash.tn.edge.ingrambook.com [198.183.167.2]) (Using TLS) by service93-us.mimecast.com; Thu, 06 Sep 2012 10:03:03 -0400 Received: from USLVDCMBVP01.ingramcontent.com ([fe80::a4ce:7d28:d16e:872a]) by USLVDCHUBP02.ingramcontent.com ([::1]) with mapi; Thu, 6 Sep 2012 09:03:02 -0500 From: "Dyer, James" To: "solr-user@lucene.apache.org" Date: Thu, 6 Sep 2012 09:03:00 -0500 Subject: RE: deletedPkQuery not work in solr 3.3 Thread-Topic: deletedPkQuery not work in solr 3.3 Thread-Index: Ac2L0H/9op7vTzqpQXO+dzRUWxHlsgAZy+Aw Message-ID: <8F0D0142CA7ECC4287A9EC1BD8CB880C180924478E@USLVDCMBVP01.ingramcontent.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-MC-Unique: 112090610030301001 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org You have "deletedPKQuery", but the correct spelling is "deletedPkQuery" (lo= wercase "k"). Try that and see if it fixes your problem. =20 Also, you can probably simplify this if you do this as "command=3Dfull-impo= rt&clean=3Dfalse", then use something like this for your query: select product_id as '$deleteDocById' from modified_product=20 where gmt_create > to_date('${dataimporter.last_index_time}','yyyy-mm-dd= hh24:mi:ss')=20 and modification =3D 'deleted' See http://wiki.apache.org/solr/DataImportHandler#Special_Commands for more= info on this technique. Finally, you will want to be aware of https://issues.apache.org/jira/browse= /SOLR-2492 , a bug which was fixed in Solr 3.4. DIH doesn't automatically = do a commit in some cases if your import only does deletes. You need to is= sue a commit manually after it completes. James Dyer E-Commerce Systems Ingram Content Group (615) 213-4311 -----Original Message----- From: jun Wang [mailto:wangjundot@gmail.com]=20 Sent: Wednesday, September 05, 2012 8:33 PM To: solr-user@lucene.apache.org Subject: deletedPkQuery not work in solr 3.3 I have a data-config.xml with 2 entity, like ... and ... entity delta_build is for delta import, query is ?command=3Dfull-import&entity=3Ddelta_build&clean=3Dfalse and I want to using deletedPkQuery to delete index. So I have add those to entity "delta_build" deltaQuery=3D"select -1 as ID from dual" deltaImportQuery=3D"select * from product where a.id=3D'${dataimporter.delt= a.ID}' " deletedPKQuery=3D"select product_id as ID from modified_product where gmt_create > to_date('${dataimporter.last_index_time}','yyyy-mm-dd hh24:mi:ss') and modification =3D 'deleted'" deltaQuery and deltaImportQuery is simply to avoid delta import any records, course delta import has been implement by full import. and I am just want using delta for delete index. But when I hit query ?command=3Ddelta-import deltaQuery and deltaImportQuery can be found in log, and without deletedPKQuery. Is there any thing wrong in config file? --=20 from Jun Wang