From lucene-user-return-7445-apmail-jakarta-lucene-user-archive=jakarta.apache.org@jakarta.apache.org Tue Mar 09 17:48:23 2004 Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 66158 invoked from network); 9 Mar 2004 17:48:23 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 Mar 2004 17:48:23 -0000 Received: (qmail 13386 invoked by uid 500); 9 Mar 2004 17:47:54 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 13334 invoked by uid 500); 9 Mar 2004 17:47:54 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 13282 invoked from network); 9 Mar 2004 17:47:54 -0000 Received: from unknown (HELO rwcrmhc13.comcast.net) (204.127.198.39) by daedalus.apache.org with SMTP; 9 Mar 2004 17:47:54 -0000 Received: from apache.org (c-24-5-145-151.client.comcast.net[24.5.145.151]) by comcast.net (rwcrmhc13) with ESMTP id <20040309174748015005f9lse>; Tue, 9 Mar 2004 17:47:49 +0000 Message-ID: <404E0320.9010303@apache.org> Date: Tue, 09 Mar 2004 09:47:12 -0800 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 Users List Subject: Re: DocumentWriter, StopFilter should use HashMap... (patch) References: <404D22CF.7050705@newsmonster.org> <404D8B2E.2020701@newsmonster.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 Erik Hatcher wrote: > Well, one issue you didn't consider is changing a public method > signature. I will make this change, but leave the Hashtable signature > method there. I suppose we could change the signature to use a Map > instead, but I believe there are some issues with doing something like > this if you do not recompile your own source code against a new Lucene > JAR.... so I will simply provide another signature too. This is also a problem for folks who're implementing analyzers which use StopFilter. For example: public MyAnalyzer extends Analyzer { private static Hashtable stopTable = StopFilter.makeStopTable(stopWords); public TokenStream tokenStream(String field, Reader reader) { ... new StopFilter(stopTable) ... } This would no longer compile with the change Kevin proposes. To make things back-compatible we must: 1. Keep but deprectate StopFilter(Hashtable) constructor; 2. Keep but deprecate StopFilter.makeStopTable(String[]); 3. Add a new constructor: StopFilter(HashMap); 4. Add a new method: StopFilter.makeStopMap(String[]); Does that make sense? Doug --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org