lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: IndexFileNames
Date Tue, 23 Feb 2010 11:52:56 GMT
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 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


Mime
View raw message