lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: DocumentWriter, StopFilter should use HashMap... (patch)
Date Wed, 10 Mar 2004 23:33:29 GMT
On Mar 10, 2004, at 2:59 PM, Kevin A. Burton wrote:
>> I refuse to expose HashSet... sorry!  :)  But I did wrap what is 
>> passed in, like above, in a HashSet in my latest commit.
>
> Hm... You're doing this EVEN if the caller passes a HashSet directly?!

Well it was in the ctor.  But I guess I'm not seeing all the times the 
filter is being constructed to make this a cause a performance hit.

> Why do you have a problem exposing a HashSet/Map... it SHOULD be a 
> Hash based implementation.  Doing anything else is just wrong and 
> would seriously slow down Lucene indexing.

Just semantically, it is a "set" of stop words - so in theory it 
shouldn't matter the actual implementation.  I'm an interface purist at 
heart.

> Also... you're HashSet constructor has to copy values from the 
> original HashSet into the new HashSet ... not very clean and this can 
> just be removed by forcing the caller to use a HashSet (which they 
> should).

I've caved in and gone HashSet all the way.

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message