lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: IndexFileNames
Date Tue, 07 Jun 2005 17:13:09 GMT
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 
> If done, we can avoid all dependencies within 
> FSDirectory to org.apache.lucene.index, which is very clean.

I think that's an illusion: the store package would actually become more 
dependent on the index package.  If someone changes the set of files in 
an index then the changes will not be localized to the index package. 
Nothing outside of the index package should know anything about the 
internal structure of an index.

If insteaed the index package exposes a public API that permits other 
packages to inquire whether particular file names belong to an index 
then only a small dependency on what should be a stable API is exposed. 
  Changes to index structure can be made without changing anything 
outside of the index package.

> Why not creating a new public final class 
> and move LuceneFileFilter, 
> Constants.INDEX_*, SegmentMerger.COMPOUND_EXTENSIONS, 
> SegmentMerger.VECTOR_EXTENSIONS and IndexReader.FILENAME_EXTENSIONS to it.

I still think this class should be in the index package.  I'm not 
convinced that anything other than the FileFilter needs to be public.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message