lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: DocumentWriter, StopFilter should use HashMap... (patch)
Date Wed, 10 Mar 2004 10:02:06 GMT
On Mar 9, 2004, at 10:23 PM, Kevin A. Burton wrote:
> You need do make it a HashSet:
>   table = new HashSet( stopTable.keySet() );


> Also... while you're at it... the private variable name is 'table' 
> which this HashSet certainly is *not* ;)

Well, depends on your definition of 'table' I suppose :)  I changed it 
to a type-agnostic stopWords.

> Probably makes sense to just call this variable 'hashset' and then 
> force the type to be HashSet since it's necessary for this to be a 
> HashSet to maintain any decent performance.  You'll need to update 
> your second constructor to require a HashSet too.. would be very bad 
> to let callers use another set impl... TreeSet and SortedSet would 
> still be too slow...

I refuse to expose HashSet... sorry!  :)  But I did wrap what is passed 
in, like above, in a HashSet in my latest commit.


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

View raw message