From java-dev-return-10354-apmail-lucene-java-dev-archive=lucene.apache.org@lucene.apache.org Tue Jun 07 17:05:18 2005 Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 25715 invoked from network); 7 Jun 2005 17:05:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jun 2005 17:05:18 -0000 Received: (qmail 65632 invoked by uid 500); 7 Jun 2005 17:05:14 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 65607 invoked by uid 500); 7 Jun 2005 17:05:14 -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 65593 invoked by uid 99); 7 Jun 2005 17:05:14 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from p15112568.pureserver.info (HELO p15112568.pureserver.info) (217.160.91.29) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 07 Jun 2005 10:05:13 -0700 Received: from [192.168.10.124] (ppp-82-135-0-171.mnet-online.de [82.135.0.171]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by p15112568.pureserver.info (Postfix) with ESMTP id 03AAE14010F for ; Tue, 7 Jun 2005 19:04:46 +0200 (CEST) Message-ID: <42A5D3A7.3020501@apache.org> Date: Tue, 07 Jun 2005 19:04:39 +0200 From: Bernhard Messer User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: java-dev@lucene.apache.org Subject: Re: IndexFileNames References: <20050606175214.5032.qmail@minotaur.apache.org> <42A496B9.2050506@apache.org> <42A54312.4030405@apache.org> In-Reply-To: <42A54312.4030405@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Bernhard Messer wrote: > Doug Cutting wrote: > >> bmesser@apache.org 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.FILENAME_EXTENSIONS[i])) >>> return true; >>> } >>> - if (name.equals("deletable")) return true; >>> - else if (name.equals("segments")) return true; >>> + if (name.equals(Constants.INDEX_DELETABLE_FILENAME)) return >>> true; >>> + else if (name.equals(Constants.INDEX_SEGMENTS_FILENAME)) >>> return true; >>> else if (name.matches(".+\\.f\\d+")) return true; >>> return false; >> >> >> >> This really belongs in the index package. That way, when we change >> the set of files in an index, the changes will be localized. >> >> So this, LuceneFileFilter, Constants.INDEX_* and >> IndexReader.FILENAME_EXTENSIONS, should all be moved to a common home >> in the index package, like org.apache.lucene.index.IndexFileNames. >> Thoughts? >> 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. 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. Does it sound ok ? Bernhard > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org