Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 92650 invoked from network); 23 Feb 2010 11:56:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Feb 2010 11:56:44 -0000 Received: (qmail 82177 invoked by uid 500); 23 Feb 2010 11:56:43 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 82119 invoked by uid 500); 23 Feb 2010 11:56:43 -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 82111 invoked by uid 99); 23 Feb 2010 11:56:43 -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:56:43 +0000 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 serera@gmail.com designates 74.125.78.26 as permitted sender) Received: from [74.125.78.26] (HELO ey-out-2122.google.com) (74.125.78.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2010 11:56:36 +0000 Received: by ey-out-2122.google.com with SMTP id d26so843373eyd.3 for ; Tue, 23 Feb 2010 03:56:15 -0800 (PST) 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; bh=EWuV9ugqiRs5ULPBIuLQJXu7zFL2UZbfUj5MyurrGdA=; b=TxPneD9VYtYol3fx0sBte5/D1STQ1dcq0nF81Nd7FzgV4xXWbJ4C+OSIO7n1rKYeWT ZfCUlk8na8YNU2s6xe1NLt+pGdo6YqDHs5hQvsOeQBFwjZ/OYlOQToCmm4c9+lTco95q B84t+XVL5Xdr6NYvF8V4rPaS+LW+DFD9rbLT4= 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; b=F67UyhRrGeBhAWFtCH8mKDWDq7enpaUnv35BZBRb4NicJ73CE41BMB3/tLqFnJ52Wg axCPH6giWo/pfro3hrmGb+R6y7KYU0PgeLmQrJHUD6tBQphOBhy43123jA5YkydL8ycN uK9tRWsicUF1nk/b/Fp7z/d1Q87NhKng/VSC0= MIME-Version: 1.0 Received: by 10.213.1.147 with SMTP id 19mr460078ebf.57.1266926175866; Tue, 23 Feb 2010 03:56:15 -0800 (PST) In-Reply-To: <9ac0c6aa1002230352i614fdb4bxae00a0bd118934cc@mail.gmail.com> References: <786fde51002222242y7504f736n440b92bdb9c60138@mail.gmail.com> <9ac0c6aa1002230316x48cc41f0gd8748e05a93466d8@mail.gmail.com> <786fde51002230322gcd8bb8fpeef81e06817a6647@mail.gmail.com> <9ac0c6aa1002230331k38a8a748p1b5180ec9100efe2@mail.gmail.com> <786fde51002230346v59c4bbdckbd60561a4a0182fc@mail.gmail.com> <9ac0c6aa1002230352i614fdb4bxae00a0bd118934cc@mail.gmail.com> Date: Tue, 23 Feb 2010 13:56:15 +0200 Message-ID: <786fde51002230356l3355186k7195302b14be8e5a@mail.gmail.com> Subject: Re: IndexFileNames From: Shai Erera To: java-dev@lucene.apache.org Content-Type: multipart/alternative; boundary=000e0cdf979eab4e520480433cf9 --000e0cdf979eab4e520480433cf9 Content-Type: text/plain; charset=ISO-8859-1 ok great ! I'll create an issue and work out a patch. Shai On Tue, Feb 23, 2010 at 1:52 PM, Michael McCandless < lucene@mikemccandless.com> wrote: > 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 > > --000e0cdf979eab4e520480433cf9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
ok great !

I'll create an issue and work out a = patch.

Shai

On Tue, Feb 23, 2010 a= t 1:52 PM, Michael McCandless <lucene@mikemccandless.com> wrote:
On Tue, Feb 23, 2010 at 6:46 AM, Shai Erera <serera@gmail.com> wrote:
> I don't think performance is the issue here, but rather correctnes= s. Someone
> cannot just ask filename.endsWith(DELETION_EXT) as files like "fi= le1del"
> would match as well. So whenever you make such check, you need to add = ".".
> Again, not performance, but correctness.

I see. =A0To 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 m= ind 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 i= t :).
>
> So do you agree to change it to public? I can do that and also make su= re
> Lucene's code always calls segmentFileName ...

OK let's leave the extensions as they are (no dots), make it publ= ic,
and fix Lucene to always use IFNs methods when working with index file
names? =A0Thanks!

Mike

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


--000e0cdf979eab4e520480433cf9--