Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 11700 invoked from network); 22 May 2009 18:09:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 May 2009 18:09:24 -0000 Received: (qmail 39907 invoked by uid 500); 22 May 2009 18:09:37 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 39815 invoked by uid 500); 22 May 2009 18:09:36 -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 39807 invoked by uid 99); 22 May 2009 18:09:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2009 18:09:36 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.46.30] (HELO yw-out-2324.google.com) (74.125.46.30) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2009 18:09:28 +0000 Received: by yw-out-2324.google.com with SMTP id 2so929343ywt.5 for ; Fri, 22 May 2009 11:09:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.201.4 with SMTP id y4mr8010977ybf.306.1243015746184; Fri, 22 May 2009 11:09:06 -0700 (PDT) In-Reply-To: References: <786fde50905202034n5250bc9dk844c39a7d734668c@mail.gmail.com> <9ac0c6aa0905210925q2df382d2v6d8ea95a8cc69c14@mail.gmail.com> <4A15849B.9080007@gmail.com> <9ac0c6aa0905210955h7bf6b3d8kdf06ec7c867a95cd@mail.gmail.com> <20090521175904.GA11189@rectangular.com> <9ac0c6aa0905211419u7d1cdf47ied31ab072a48cb1b@mail.gmail.com> <20090521225318.GA12011@rectangular.com> <9ac0c6aa0905220833l6e31fe84xabf716728edceec8@mail.gmail.com> <9ac0c6aa0905220853vd94f071g51078439047dfa3f@mail.gmail.com> Date: Fri, 22 May 2009 14:09:05 -0400 Message-ID: <9ac0c6aa0905221109g55c8212vd0857749a1bede11@mail.gmail.com> Subject: Re: Lucene's default settings & back compatibility From: Michael McCandless To: java-dev@lucene.apache.org, yonik@lucidimagination.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Fri, May 22, 2009 at 12:44 PM, Yonik Seeley wrote: > I'm not a lawyer, so I dislike trying to nail down every detail in > writing and try to solve future problems in the abstract. Agreed, and there's always leeway in what we work out here (LUCENE-1436 is a good recent example), but I think working out broad guidelines for us to follow is still worthwhile. EG I think the existing guidelines have served us well (in that it's something to follow when working on changes). > Lucene has never really been 100% back compatible... we've just tried > to keep it that way... it's more of a mindset than a reality, and I'm > wary of changing that mindset too much. Lucene has benefited from API > and design stability, and I think the bar should be kept high for > changes (i.e. there should be clear benefits). > > Anyway, I think substantially relaxing back compat requirements is > enough of a change that it should at some point go to a vote (once > people figure out exactly what is being voted on ;-) Definitely, if we can actually figure out what to vote on, we should vote on this change... > That doesn't apply to a static actsAsVersion that would preserve back > compatibility by default of course. Actually I was wanting by default to *not* preserve back compat. Ie, new users see Lucene's latest & greatest for free; old users must set back-compate level. > Depending on the specifics, it may often be simpler/cleaner to create > a new class / constructor and deprecate the old, as we do now. True, and actually this is a viable workaround/fallback if we can't otherwise come to agreement, to let new users see the best of Lucene by default. So eg we could deprecate: public TopFieldDocs search(Query query, Filter filter, int n, Sort sort) and add: public TopFieldDocs search(Query query, Filter filter, int n, Sort sort, boolean includeScores) (or something along those lines). Or, deprecate IndexReader.open in favor of open(boolean readOnly). It's not an unreasonable approach, in that whenever there is a setting that needs to change in a given release, we simply make it explicit. Though this is more awkward for bug fixes to StandardAnalyzer (for example). What would the new ctor look like? I guess you'd pass in the "invalidAcronyms" to the ctor. >> 4. [Maybe?] Allow certain limited changes that will require source >> code changes in your app on upgrading to a new minor release: >> adding a new method to an interface, adding a new abstract method >> to an abstract class, renaming of deprecated methods. > > +1, depending on the specifics. This is where back compat rules > shouldn't be cast in stone. > There are some public classes in Lucene that are really just > implementation artifacts - pretty much no one will directly use those > classes and changes to those shouldn't be a big deal. Right. Mike --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org