Re: IndexFileNames

2010-02-23 Thread Shai Erera
ok great ! I'll create an issue and work out a patch. Shai On Tue, Feb 23, 2010 at 1:52 PM, Michael McCandless < luc...@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

Re: IndexFileNames

2010-02-23 Thread Michael McCandless
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 per

Re: IndexFileNames

2010-02-23 Thread Shai Erera
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. If we make it public, then we ca

Re: IndexFileNames

2010-02-23 Thread Michael McCandless
Well, there are two issues: * We don't always call IFN.segmentFileName -- often we simply concatenate strings directly throughout the sources. * Should the extensions include '.' or not? I'd really like to fix the first issue. If we do that, then there's only 1 place that performs string co

Re: IndexFileNames

2010-02-23 Thread Shai Erera
But segmentFileName performs the concatenation internally: static String segmentFileName(String segmentName, String ext) { return segmentName + "." + ext; } So that would not avoid anything right? And still, if someone needs to know whether a certain file is a core Lucene file or his own a

Re: IndexFileNames

2010-02-23 Thread Michael McCandless
This class makes me somewhat nervous, with the changes coming in flex, because the extensions are no longer static but rather a function of the particular codec you're using in the index. I've changed some of the constants accordingly (on flex). Still, I think it's OK to make it public (flex has

Re: IndexFileNames

2005-06-09 Thread Doug Cutting
Bernhard Messer wrote: I finished the changes and commited the changes. There are two new classes in package org.apache.lucene.index. org.apache.lucene.index.IndexFileNames contains common lucene related filenames and extensions, the scope of the class itself and it's members are package. org.

Re: IndexFileNames

2005-06-09 Thread Bernhard Messer
Doug Cutting wrote: Bernhard Messer wrote: sorry for the confusion. On the first look, i thought the new class IndexFileNames, containing the necessary constant values, fits perfect into org.apache.lucene.index. After a more detailed look, i get the feeling that it would be much better to pl

Re: IndexFileNames

2005-06-07 Thread Doug Cutting
Bernhard Messer wrote: sorry for the confusion. On the first look, i thought the new class IndexFileNames, containing the necessary constant values, fits perfect into org.apache.lucene.index. After a more detailed look, i get the feeling that it would be much better to place the new class into

Re: IndexFileNames

2005-06-07 Thread Bernhard Messer
Bernhard Messer wrote: Doug Cutting wrote: [EMAIL PROTECTED] wrote: --- lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java Mon Jun 6 10:52:12 2005 @@ -52,8 +52,8 @@ if (name.ends

Re: IndexFileNames

2005-06-06 Thread Bernhard Messer
Doug Cutting wrote: [EMAIL PROTECTED] wrote: --- lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java (original) +++ lucene/java/trunk/src/java/org/apache/lucene/store/FSDirectory.java Mon Jun 6 10:52:12 2005 @@ -52,8 +52,8 @@ if (name.endsWith("."+IndexReader.FILE