Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 91953 invoked from network); 23 Feb 2010 11:53:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Feb 2010 11:53:26 -0000 Received: (qmail 78587 invoked by uid 500); 23 Feb 2010 11:53:25 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 78529 invoked by uid 500); 23 Feb 2010 11:53:25 -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 78521 invoked by uid 99); 23 Feb 2010 11:53:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2010 11:53:25 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [209.85.210.173] (HELO mail-yx0-f173.google.com) (209.85.210.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2010 11:53:18 +0000 Received: by yxe3 with SMTP id 3so254004yxe.5 for ; Tue, 23 Feb 2010 03:52:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.150.252.5 with SMTP id z5mr6826434ybh.25.1266925976934; Tue, 23 Feb 2010 03:52:56 -0800 (PST) In-Reply-To: <786fde51002230346v59c4bbdckbd60561a4a0182fc@mail.gmail.com> References: <786fde51002222242y7504f736n440b92bdb9c60138@mail.gmail.com> <9ac0c6aa1002230316x48cc41f0gd8748e05a93466d8@mail.gmail.com> <786fde51002230322gcd8bb8fpeef81e06817a6647@mail.gmail.com> <9ac0c6aa1002230331k38a8a748p1b5180ec9100efe2@mail.gmail.com> <786fde51002230346v59c4bbdckbd60561a4a0182fc@mail.gmail.com> Date: Tue, 23 Feb 2010 06:52:56 -0500 Message-ID: <9ac0c6aa1002230352i614fdb4bxae00a0bd118934cc@mail.gmail.com> Subject: Re: IndexFileNames From: Michael McCandless To: java-dev@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 On Tue, Feb 23, 2010 at 6:46 AM, Shai Erera wrote: > I don't think performance is the issue here, but rather correctness. Someone > cannot just ask filename.endsWith(DELETION_EXT) as files like "file1del" > would match as well. So whenever you make such check, you need to add ".". > Again, not performance, but correctness. I see. To address this we could create a new method on IFN (matchesExtension?), so one should never use string ops on IFN's constants? > If we make it public, then we can document that clearly. I don't mind if we > stay w/o the ".". I just thought that we can correct it, and gain few ticks > of performance as a side effect. But I don't want to argue about it :). > > So do you agree to change it to public? I can do that and also make sure > Lucene's code always calls segmentFileName ... OK let's leave the extensions as they are (no dots), make it public, and fix Lucene to always use IFNs methods when working with index file names? Thanks! Mike --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org