lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: DocumentWriter, StopFilter should use HashMap... (patch)
Date Tue, 09 Mar 2004 17:47:12 GMT
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 =

   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?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message