Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@www.apache.org Received: (qmail 90966 invoked from network); 19 Apr 2004 18:48:47 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 19 Apr 2004 18:48:47 -0000 Received: (qmail 57141 invoked by uid 500); 19 Apr 2004 18:48:34 -0000 Delivered-To: apmail-jakarta-lucene-dev-archive@jakarta.apache.org Received: (qmail 57124 invoked by uid 500); 19 Apr 2004 18:48:34 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 57109 invoked from network); 19 Apr 2004 18:48:34 -0000 Received: from unknown (HELO rwcrmhc13.comcast.net) (204.127.198.39) by daedalus.apache.org with SMTP; 19 Apr 2004 18:48:34 -0000 Received: from apache.org (c-24-5-145-151.client.comcast.net[24.5.145.151]) by comcast.net (rwcrmhc13) with ESMTP id <2004041918483901500rm07pe>; Mon, 19 Apr 2004 18:48:39 +0000 Message-ID: <40841EFF.2060204@apache.org> Date: Mon, 19 Apr 2004 11:48:31 -0700 From: Doug Cutting User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lucene Developers List Subject: Re: cvs commit: jakarta-lucene/src/java/org/apache/lucene/index MultiReader.java FilterIndexReader.java IndexReader.java SegmentReader.java References: <20040416091706.57408.qmail@minotaur.apache.org> <40840AFB.8040906@apache.org> <40840E80.90804@detego-software.de> In-Reply-To: <40840E80.90804@detego-software.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Christoph Goller wrote: >> The non-public SegmentInfos makes an appearance here in a public API. >> Perhaps this constructor should be package-private. > > Both constructors of IndexReader or at least the one with SegmentInfos > should > be made package-private. Thats probably better than protected. We need at least one that's not package private, so that classes outside this package can implement the IndexReader API. >> Or perhaps, since the SegmentInfos instance is only used once on line >> 414, for version checking, we should instead add an abstract >> getVersion() method implemented by subclasses. Could that work? > > Don�t know exactly what you mean here. We already have the > getCurrentVersion > method in IndexReader, but you probably mean something else. I was trying to think of a way to avoid having to pass the SegmentInfos to this constructor at all, since it is only used once to extract a long. Perhaps one could simply pass the long in? Perhaps the SegmentInfos field of IndexReader could be replaced with a version field. I'm just trying to reduce the IndexReader's dependencies on package-private implementation stuff, to make it a more pure abstract class. This is not high-priority. > Do you agree to the changes concerning the bahavior of undeleteAll and > close? Yes, I think these look good. Doug --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-dev-help@jakarta.apache.org