lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] Commented: (LUCENE-460) hashCode improvements
Date Mon, 31 Oct 2005 14:01:55 GMT
    [ ] 

Yonik Seeley commented on LUCENE-460:

Paul, I'm not sure I understand your point about "structure information added by the query
parser is lost in the hash".
Let me rephrase my statement in case you misunderstood me:

   - hash codes should strive to avoid collisions across Query hierarchy, not just within
one specific
     subclass. An example of hashCode implementations that don't do this are TermQuery(t)
and SpanTermQuery(t) which will generate the exact same hash codes. 

> What's the point of hash code uniqueness over subclasses? 

The same point as hash code uniqueness (avoiding collisions) within a particular class - the
more collisions you have, the more it will slow down hash based lookups.  Things should still
work if all hashCodes mapped to the same number, but it would be dog slow.

> 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