You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Daniel Naber <da...@t-online.de> on 2004/10/18 23:43:31 UTC

equals() is implemented in some Querys only

Hi,

what's the reason that e.g. PhraseQuery implements equals, but FuzzyQuery 
doesn't? Could this become a problem in some situations?

Regards
 Daniel

-- 
http://www.danielnaber.de

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


Re: equals() is implemented in some Querys only

Posted by Christoph Goller <go...@detego-software.de>.
Daniel Naber schrieb:
> Hi,
> 
> what's the reason that e.g. PhraseQuery implements equals, but FuzzyQuery 
> doesn't? Could this become a problem in some situations?
> 
> Regards
>  Daniel
> 

I don't think there is a reason for this and I think all Queries should
implement equals and hashCode.

It seems that Lucene itself currently does not use equals for
Queries. Applications outside could need it, e.g. for storing a cache
of queries.

Christoph


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