lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <ysee...@gmail.com>
Subject Re: LUCENE-460
Date Fri, 23 Dec 2005 16:27:03 GMT
Here is my previous reply to Otis:

> python -c "import random;print hex(random.getrandbits(32))[:-1]"
> Just a way of making some things unique.... let me know if you have a
> better idea on that.

So those constants are just random numbers.  I thought about trying to
pick magic numbers to maximize hamming distances, etc, but it's more
work and more likely to mess things up if you get it wrong. 
getClass().hashCode() would also work, but it would be slower.

I'll add this explanation to the bug.

-Yonik

On 12/23/05, Pasha Bizhan <lucene-list@lucenedotnet.com> wrote:
> Hi,
>
> Question about latest cvs changes and hashcodes.
> http://issues.apache.org/jira/browse/LUCENE-460
>
> Could anybody explain the magic numbers? 0x6634D93C,0x2742E74A and other.
> Any special meaning? Is this documented anywhere?
>
> Pasha
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

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


Mime
View raw message