Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 36413 invoked from network); 18 May 2009 11:56:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 May 2009 11:56:47 -0000 Received: (qmail 86198 invoked by uid 500); 18 May 2009 11:56:46 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 86114 invoked by uid 500); 18 May 2009 11:56:45 -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 86106 invoked by uid 99); 18 May 2009 11:56:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 May 2009 11:56:45 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of earwin@gmail.com designates 209.85.220.206 as permitted sender) Received: from [209.85.220.206] (HELO mail-fx0-f206.google.com) (209.85.220.206) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 May 2009 11:56:36 +0000 Received: by fxm2 with SMTP id 2so3710002fxm.5 for ; Mon, 18 May 2009 04:56:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ZkhA3MOWUgYTs9gXJ823prTzP48tzBbsZBZQngNY/V4=; b=mBaVJPk7WcYFT0V5jV+tGdDYiSAl+6S2IB9rziV1zgaxvNbpNcQ7xno8QuAoXL3KXv AovMTdUpSlMGFkQVYeaD57Cl1GnE3E1RkM+fRdOBbfH8bRIU1BvWKV7VUNjeIYYb8wIH hnL/TP4pGQju4OwZl1AFXMb6BgG5cIEuFjikA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=f+3vb9NvXDU+mLNTBPBbM9X/R9ARheLyqeLFGGrMrxqO+1L46grzd8LVRoo989tb/y Dc8dmy+6aLIRpIv4fy79yGvpN0CUio25aCm6reTqGK6F5P8Qxe7gfxAjPklkwuvJv9tT FPGKdgaiLJLMrSqOS/w2GK2W0vPv2Lv6yR6jI= MIME-Version: 1.0 Received: by 10.86.79.12 with SMTP id c12mr6568771fgb.64.1242647775568; Mon, 18 May 2009 04:56:15 -0700 (PDT) In-Reply-To: <9ac0c6aa0905170859r3fac3c7dm9b31490a6f3d5fb5@mail.gmail.com> References: <59b3eb370905170537l1d07c6e3pac3caf441fe4b7cd@mail.gmail.com> <9ac0c6aa0905170859r3fac3c7dm9b31490a6f3d5fb5@mail.gmail.com> Date: Mon, 18 May 2009 15:56:15 +0400 Message-ID: <59b3eb370905180456l3f825e9en8f9b937a60ba6572@mail.gmail.com> Subject: Re: Re(opening) (Multi)SegmentReaders From: Earwin Burrfoot To: java-dev@lucene.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Will post one soon. Had to slightly modify a whole bunch of tests relying on IndexReader.open(dir) returning SegmentReader instance for single-segment indexes. Currently struggling with Clone/CloneNorms/Reopen tests that actually verify old behaviour. The fun part is - SR no longer has to pose as toplevel directory-owning reader, so most of stuff moved from DIR to MSR and now DIR is almost empty, save for static factory methods and a pair of flags. I'm going to remove DIR completely and make MSR/SR inherit directly from IR= . All affected classes/methods are package-private, so I bet that doesn't hamper backwards compatibility? 2009/5/17 Michael McCandless : > I tentatively think that's a good idea. =C2=A0The reopen logic is quite h= airy... > > Wanna make a separate patch for that? > > Mike > > On Sun, May 17, 2009 at 8:37 AM, Earwin Burrfoot wrote= : >> While experimenting with indexReader 'components', I've got this thought= : >> >> What if we always create MultiSegmentReader when (re)opening an index, >> even if index contains a single segment? >> Using unwrapped SegmentReader for single-segment case was a valid >> optimization for the times when Lucene did collection over a single >> reader, but now it goes down to SegmentReaders anyway. >> >> If we do that, (re)open logic will become a lot more transparent. (And >> consequently, hooking into it) >> >> -- >> Kirill Zakharenko/=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB =D0=97=D0=B0=D1= =85=D0=B0=D1=80=D0=B5=D0=BD=D0=BA=D0=BE (earwin@gmail.com) >> Home / Mobile: +7 (495) 683-567-4 / +7 (903) 5-888-423 >> ICQ: 104465785 >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-dev-help@lucene.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org > > --=20 Kirill Zakharenko/=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB =D0=97=D0=B0=D1=85= =D0=B0=D1=80=D0=B5=D0=BD=D0=BA=D0=BE (earwin@gmail.com) Home / Mobile: +7 (495) 683-567-4 / +7 (903) 5-888-423 ICQ: 104465785 --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org