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 place the new class
into org.apache.store. 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
org.apache.lucene.store.IndexFileNames 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.
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.apache.lucene.index.IndexFileFilter is public and used
in FSDirectory to decide whether a file belongs to an lucene index and
can be deleted.
Bernhard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]