Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 31709 invoked from network); 15 Aug 2006 12:58:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Aug 2006 12:58:48 -0000 Received: (qmail 7431 invoked by uid 500); 15 Aug 2006 12:58:33 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 7408 invoked by uid 500); 15 Aug 2006 12:58:32 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 7395 invoked by uid 99); 15 Aug 2006 12:58:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Aug 2006 05:58:32 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [213.151.89.70] (HELO server) (213.151.89.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Aug 2006 05:58:28 -0700 Received: from [85.207.40.193] (helo=[10.10.1.71]) by server with esmtp (Exim 4.50) id 1GCyUg-0000sb-Dj for java-user@lucene.apache.org; Tue, 15 Aug 2006 14:58:06 +0200 Message-ID: <44E1C53A.1080602@tejnora.cz> Date: Tue, 15 Aug 2006 14:59:38 +0200 From: Karel Tejnora User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: updating document References: <1155145453.2739.8.camel@localhost.localdomain> <359a92830608100616re219fe3la419623871885798@mail.gmail.com> <1155171673.3388.3.camel@localhost.localdomain> <1155230981.9137.4.camel@localhost.localdomain> <44DC791A.2030800@tejnora.cz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 85.207.40.193 X-SA-Exim-Mail-From: karel@tejnora.cz X-SA-Exim-Scanned: No (on server); SAEximRunCond expanded to false X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Well, you can have! :-) Even I have not tested, just an idea. You can get document id after add - numDocs() and insert if DB fails, you can delete document from RAMDir. Or in my case of batches - im adding documents in DB with savepoint, than create clear index (create=true) and at the end if everything is allright use addIndexes() if not than rollback to savepoint and send sms. > Unfortunately you may have transactional problems with this approach. > That > is, if you write to lucene and in the same logical transaction you > write to > external storage you may have atomicity problems if one of these actions > fails. But you can't have everything! --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org