lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "paul.elschot (JIRA)" <>
Subject [jira] Commented: (LUCENE-460) hashCode improvements
Date Mon, 31 Oct 2005 07:52:00 GMT
    [ ] 

paul.elschot commented on LUCENE-460:

>  - hash codes should strive to be unique across the Query hierarchy, not just unique
within one specific
> subclass. For example, TermQuery(t) and SpanTermQuery(t) will generate the exact same
hash codes. 

This has the disadvantage that the structure information added by the query parser is lost
in the hash.
In case a hash is needed over the query text before parsing, one can use precisely that.
What's the point of hash code uniqueness over subclasses?

Paul Elschot

> hashCode improvements
> ---------------------
>          Key: LUCENE-460
>          URL:
>      Project: Lucene - Java
>         Type: Improvement
>   Components: Search
>     Versions: CVS Nightly - Specify date in submission
>     Reporter: Yonik Seeley
>     Priority: Minor
>      Fix For: CVS Nightly - Specify date in submission

> It would be nice for all Query classes to implement hashCode and equals to enable them
to be used as keys when caching.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

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

View raw message