[
http://issues.apache.org/jira/browse/LUCENE-460?page=comments#action_12361200 ]
Yonik Seeley commented on LUCENE-460:
-
Some people have asked where some of the magic constants come from in the
hashCodes:
python -c import random;print
[
http://issues.apache.org/jira/browse/LUCENE-460?page=comments#action_12356432 ]
paul.elschot commented on LUCENE-460:
-
For example, TermQuery(t) and SpanTermQuery(t) will generate the exact same
hash codes.
I'm sorry, I misread this as an
[
http://issues.apache.org/jira/browse/LUCENE-460?page=comments#action_12356325 ]
Yonik Seeley commented on LUCENE-460:
-
A couple of guidelines off the top of my head...
- hash codes should strive to be unique across the Query hierarchy, not just
[
http://issues.apache.org/jira/browse/LUCENE-460?page=comments#action_12356326 ]
Yonik Seeley commented on LUCENE-460:
-
Oh, and preserve entropy by using reversible integer hash functions (see the
previous link).
- key ^= (key a) | (key b); for
[
http://issues.apache.org/jira/browse/LUCENE-460?page=comments#action_12356384 ]
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,