Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 45807 invoked from network); 2 Dec 2008 01:26:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Dec 2008 01:26:41 -0000 Received: (qmail 71430 invoked by uid 500); 2 Dec 2008 01:26:46 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 71389 invoked by uid 500); 2 Dec 2008 01:26:46 -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 71378 invoked by uid 99); 2 Dec 2008 01:26:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Dec 2008 17:26:46 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jason.rutherglen@gmail.com designates 74.125.44.29 as permitted sender) Received: from [74.125.44.29] (HELO yx-out-2324.google.com) (74.125.44.29) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2008 01:25:18 +0000 Received: by yx-out-2324.google.com with SMTP id 3so1056865yxj.5 for ; Mon, 01 Dec 2008 17:26:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=KlppTlGoHYAbLplPPstFcrJLK2WYLQ39lBpGzsVfDLo=; b=g8P25UNUP7O/5EeI3Fp/ndvkdsKEjfYlOXQQrEluQyKrH6MggR8Y5jXwOj5QxDbPDU CdCel1eOUv5H02bvBgFgLkWy9I1ExRDxCNIJToD1iWQB6r4yjSYHckZr7aMTL5/ZKIvw tWwP9PqWfexIhD10BUWJA6C+V2OC/x+ZKmW2Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=sP/BE9bRSBz0EkU2mzJ5Vfvmp+Xkn0HhXapvs+SM1NAzWl247coeG6Xcl7vPp2iAUf +/AbVlre75B98uVi+i/AkxjwoX5PcDPvfcpvW2YgEcHdOXMV/bDJRu8iTx9CzpYZ/dQa sZMDOgR2RhXme+3qDlxdKKmNgRevbzAbQ+vkM= Received: by 10.150.197.8 with SMTP id u8mr22848717ybf.161.1228181165166; Mon, 01 Dec 2008 17:26:05 -0800 (PST) Received: by 10.151.72.13 with HTTP; Mon, 1 Dec 2008 17:26:05 -0800 (PST) Message-ID: <85d3c3b60812011726t6c05b274t1f6b98043d93b7e4@mail.gmail.com> Date: Mon, 1 Dec 2008 17:26:05 -0800 From: "Jason Rutherglen" To: java-user@lucene.apache.org Subject: Re: Which is faster/better In-Reply-To: <4E7EDEA6-A3C7-4381-8825-6492D059D1AD@mikemccandless.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_90503_23472986.1228181165103" References: <492B92B2.9010006@teamware.com> <492C7C6E.7070501@teamware.com> <111001c9536e$2673efd0$330bc30a@sv.us.sonicwall.com> <4E7EDEA6-A3C7-4381-8825-6492D059D1AD@mikemccandless.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_90503_23472986.1228181165103 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline It would be nice to have a pluggable solution for deleteddocs in IndexReader that accepts a Filter, and have BitVector implement Filter. This way I do not have to implement IndexReader.clone. On Mon, Dec 1, 2008 at 5:04 PM, Michael McCandless < lucene@mikemccandless.com> wrote: > > So in your UI, you'd like the delete to happen immediately and then it's OK > if the updated (added) document then takes a minute to appear? > > OK, I agree this (the immediacy of doing deletes via IndexReader) is a good > reason to keep IndexReader.deleteDocument for now. > > Mike > > > Ganesh wrote: > > I have to Tag a document based on User request. On deletion, I should do >> 'marked for delete' and on document state change, i need to update the >> document. >> Update internally does delete and add. I am commiting the writer and >> re-opening the reader, every minute. >> >> Consider, In a minute, lets say User has deleted a document from the UI. >> If i use IndexWriter, then it is updating the document. but it is getting >> refreshed only after a minute. If User refreshes his page, then he could see >> the deleted item again. >> >> In order to avoid this situitation, i need to plan >> 1. Delete the document using reader >> 2. Add the document with new state using Writer. >> >> I think, we can't avoid using DeleteDocument of Reader. Suggest me, if >> there is any other way. >> >> Regards >> Ganesh >> >> >> ----- Original Message ----- From: "Antony Bowesman" >> To: >> Sent: Wednesday, November 26, 2008 4:00 AM >> Subject: Re: Which is faster/better >> >> >> Michael McCandless wrote: >>> >>>> >>>> If you have nothing open already, and all you want to do is delete >>>> certain documents and make a commit point, then using IndexReader vs >>>> IndexWriter should show very little difference in speed. >>>> >>> >>> Thanks. This use case can assume there may be nothing open. I prefer >>> IndexWriter as delete=write is a much clearer concept that delete=read... >>> >>> As of 2.4, IndexWriter now provides delete-by-Query, which I think >>>> ought to meet nearly all of the cases where someone wants to >>>> delete-by-docID using IndexReader. >>>> >>> >>> Yes, that is an excellent addition. Up to now, our only use case for >>> delete-by-docId is to perform a dBQ and so far, we have been using your >>> suggestion from last year about how to do delete documents for ALL terms. >>> >>> Antony >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >>> For additional commands, e-mail: java-user-help@lucene.apache.org >>> >> >> Send instant messages to your online friends >> http://in.messenger.yahoo.com >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-user-help@lucene.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > ------=_Part_90503_23472986.1228181165103--