Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 13377 invoked from network); 2 Oct 2009 22:55:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Oct 2009 22:55:26 -0000 Received: (qmail 86700 invoked by uid 500); 2 Oct 2009 22:55:25 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 86617 invoked by uid 500); 2 Oct 2009 22:55:25 -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 86609 invoked by uid 99); 2 Oct 2009 22:55:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2009 22:55:25 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of buschmic@gmail.com designates 72.14.220.153 as permitted sender) Received: from [72.14.220.153] (HELO fg-out-1718.google.com) (72.14.220.153) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2009 22:55:13 +0000 Received: by fg-out-1718.google.com with SMTP id d23so32973fga.5 for ; Fri, 02 Oct 2009 15:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=e5jZs5Oulbp5JW+INz9E7Ph3Ps4ZwXzeNyPFTW1GlCM=; b=fm/yWHrEUctFq9rhQCvuD8M/4ueyplFBtYsESnQDlBbVtKm2pRaWl6y5m+VmkhAwZA VavKRQi3p8dQ/Vk9Cqec1EbmzDsGh8FPINh+Td0hwbaInpi3pblPt8cr92z3ABaaE5+a 6TJ71dDitTJW0r2gcRd2EL4u4LGxX/kYYhd8A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=DrxRh0L+guZUHELlEeV/g1xtgdJtUVcK4xR4Z3SMvb2B4zBZJtOixlEolTMwWtcT8N vFd/kqvLaAfpowELiACHU+OtsUn4ABtnDh6Y0YlyS8gmN/0aq7BgYgN+MQYfoIYjXS00 B8OZsFedbLB9nbpPsOEH2zya6cx941JK4lM5g= Received: by 10.86.173.4 with SMTP id v4mr2680505fge.78.1254524092882; Fri, 02 Oct 2009 15:54:52 -0700 (PDT) Received: from michael-buschs-macbook-pro-2.local (pD952274A.dip.t-dialin.net [217.82.39.74]) by mx.google.com with ESMTPS id e11sm404699fga.3.2009.10.02.15.54.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 02 Oct 2009 15:54:50 -0700 (PDT) Message-ID: <4AC684B7.2040505@gmail.com> Date: Sat, 03 Oct 2009 00:54:47 +0200 From: Michael Busch User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.4pre) Gecko/20090915 Thunderbird/3.0b4 MIME-Version: 1.0 To: java-dev@lucene.apache.org Subject: Re: Lucene 2.9 and deprecated IR.open() methods References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I was thinking lately about the large quantity of IndexWriter constructors and IndexReader open methods. I'm not sure if this has been proposed before, but what if we introduced new objects, e.g. IndexWriterConfig and IndexReaderConfig. They would contain getter/setter methods for all the different parameters the various constructors and open methods currently have. Then there would only be one IW constructor taking an IndexWriterConfig object as parameter and one open method in IR likewise. Then going forward we won't have to add/deprecate more ctors or open methods, we can then easily extend or deprecate getters/setters in the *Config classes. Michael On 10/3/09 12:41 AM, Uwe Schindler wrote: > When looking for press articles about the release of Lucene 2.9, I found the > following one from Bernd Fondermann > @ http://it-republik.de/jaxenter/artikel/Apache-Lucene-2.9-2594.html > > Translation with Google Translate: > ---------------------------------------------------------------------------- > Deprecated > > An index reader is created via the static open () factory method, of which > there were 2.4 in all nine. Five of them are now deprecated. In 2.9 there > are now a total of 14 open-overloaded variants, with eight of them but they > are deprecated. This means that there are even some additions that have been > directly identified with introduction as deprecated - confusing. > > The constructor-Deprecation orgy goes for the standard Analyzer, one of the > key classes during indexing and querying further. This class has now no-less > constructor arguments over what might, perhaps, some downstream libraries > bring to stumble to instantiate their analyzer on a property, which contains > the class name dynamically. Instead, an object version must be given to set > for compatibility with 2.4 or 2.9. Both the VERSION_24 as well as the > VERSION_29 parameters are deprecated but themselves - very confusing! > VERSION_CURRENT is the only safe investment in the future, a value which we > certainly also as assignment in a zero-argument constructor would have > trusted. > > To write an index we need an index writer instance. Again, the majority of > the 19 possible constructors are about to be put to retire to. > ---------------------------------------------------------------------------- > > What was going wrong with the open() hell in IR? Very strange, I should have > looked better. > > By the way: How to proceed with deprecation removal? Case-by-case (e.g. > start with TS API, then these open() calls, then FSDirectory - to list the > ones I was involved) or some hyper-patch? > > By the way, here is my talk @ Hadoop GetTogether in Berlin: > > http://blog.isabel-drost.de/index.php/archives/category/events/apache-hadoop > -get-together-berlin > > Uwe > > ----- > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213 Bremen > http://www.thetaphi.de > eMail: uwe@thetaphi.de > > > > --------------------------------------------------------------------- > 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