Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 39813 invoked from network); 22 Jun 2008 20:07:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jun 2008 20:07:27 -0000 Received: (qmail 66495 invoked by uid 500); 22 Jun 2008 20:07:27 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 66435 invoked by uid 500); 22 Jun 2008 20:07:27 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 66424 invoked by uid 99); 22 Jun 2008 20:07:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Jun 2008 13:07:27 -0700 X-ASF-Spam-Status: No, hits=2.0 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 209.85.198.232 as permitted sender) Received: from [209.85.198.232] (HELO rv-out-0506.google.com) (209.85.198.232) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Jun 2008 20:06:38 +0000 Received: by rv-out-0506.google.com with SMTP id f6so8645854rvb.5 for ; Sun, 22 Jun 2008 13:06:57 -0700 (PDT) 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=NeetkXd3kZxpxpgo0dbmpZYcAPeFmVsh9X+qY+9CbUU=; b=D8xfnRSMWeXokeVMDNNTHsdlqybXUCX7rW1yaZtb76NOn+Ib+y0DmZuNX8My/9VUWl REGFlbkXZpWdlhPRDyxUxv1tvRdzDuyZmRf/+IplVvA+QBFwlmrdga9ubYbGY3n5Pv3f e7QEO1/SVh4oDkHCzq4mIXaht5EVtpK9dXGKY= 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=MqrGu5NCKjQ+hoE3erfL8D9XoCOnFQL7Lf0FuEX0YDD14+Y+QzDqPx/UEzIiyfbR76 cOeiwVI8UVX+ggLE9ujfgGMUWyyFt5Hyl5RllX0lgGWZbTF8Q1JaE5sr28u5svDonQWX L7ptm2D7ryn3q9bcHVm5gAhWY5HTUPGdpW5UA= Received: by 10.140.132.8 with SMTP id f8mr11415247rvd.198.1214165207615; Sun, 22 Jun 2008 13:06:47 -0700 (PDT) Received: by 10.114.182.2 with HTTP; Sun, 22 Jun 2008 13:06:47 -0700 (PDT) Message-ID: <85d3c3b60806221306j67a549b6g74b159794c69654a@mail.gmail.com> Date: Sun, 22 Jun 2008 16:06:47 -0400 From: "Jason Rutherglen" To: java-dev@lucene.apache.org Subject: Re: ReaderCommit In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_19936_2028137.1214165207609" References: <85d3c3b60806220609j3efb7421pc863c79d8ac3a3ca@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_19936_2028137.1214165207609 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline For Ocean I created a workaround where the IndexCommits from IndexDeletionPolicy are saved in a map in order to achieve deleting based on the IndexReader. It would be more straightforward to delete from the IndexCommit in IndexReader. I realize people want to get away from IndexReader performing updates, however, for my use case, realtime search updating from IndexReader makes sense mainly for obtaining the doc ids of deletions. With IndexWriter managing the merges it would seem difficult to expose doc numbers, but perhaps there is a way. On Sun, Jun 22, 2008 at 3:30 PM, Michael McCandless < lucene@mikemccandless.com> wrote: > > Jason Rutherglen wrote: > > Is there a reason ReaderCommit in DirectoryIndexReader.getIndexCommit() >> does not support delete? >> > > I think we are getting away from using IndexReader to make changes to the > index, so, I didn't want to enable deleting a commit point from IndexReader. > > Is is proper behavior to use SnapshotDeletionPolicy and then keep the >> IndexCommit around? >> > > Likely not really. If you intend to keep the commit around indefinitely > you should use a better matched deletion policy that keeps track, over time, > of what should not be deleted. EG SnapshotDeletionPolicy does not save to > disk which commit points are still held open. > > What is the difference where the former does not support delete? >> > > Not sure what you're asking here? > > Mike > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org > > ------=_Part_19936_2028137.1214165207609 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline For Ocean I created a workaround where the IndexCommits from IndexDeletionPolicy are saved in a map in order to achieve deleting based on the IndexReader.  It would be more straightforward to delete from the IndexCommit in IndexReader.  I realize people want to get away from IndexReader performing updates, however, for my use case, realtime search updating from IndexReader makes sense mainly for obtaining the doc ids of deletions.  With IndexWriter managing the merges it would seem difficult to expose doc numbers, but perhaps there is a way. 

On Sun, Jun 22, 2008 at 3:30 PM, Michael McCandless <lucene@mikemccandless.com> wrote:

Jason Rutherglen wrote:

Is there a reason ReaderCommit in DirectoryIndexReader.getIndexCommit() does not support delete?

I think we are getting away from using IndexReader to make changes to the index, so, I didn't want to enable deleting a commit point from IndexReader.


Is is proper behavior to use SnapshotDeletionPolicy and then keep the IndexCommit around?

Likely not really.  If you intend to keep the commit around indefinitely you should use a better matched deletion policy that keeps track, over time, of what should not be deleted.  EG SnapshotDeletionPolicy does not save to disk which commit points are still held open.


What is the difference where the former does not support delete?

Not sure what you're asking here?

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


------=_Part_19936_2028137.1214165207609--