lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sariny" <sar...@gmail.com>
Subject Re: RE: maybe I hit a bug of Term ?
Date Fri, 10 Dec 2010 17:31:15 GMT
Object.hashCode() is "implemented by converting the internal address of the object into an
integer",

Term.hashCode() has override the default implemention,so,this question has nothing todo with
Object.hashCode().
	
I think I should try another way to cache filter results...



>Hashcodes are not guaranteed to be different. See Object#hashCode()
>javadocs.
>
>-----
>Uwe Schindler
>H.-H.-Meier-Allee 63, D-28213 Bremen
>http://www.thetaphi.de
>eMail: uwe@thetaphi.de
>
>> -----Original Message-----
>> From: Sariny [mailto:sariny@gmail.com]
>> Sent: Friday, December 10, 2010 3:34 PM
>> To: java-user
>> Subject: maybe I hit a bug of Term ?
>> 
>> 
>> 		Hi, two different Term get the same hashCode,  lucene
>> version 3.0.2
>> 
>> 		System.out.println(new
>> Term("manu_id",NumericUtils.intToPrefixCoded(111)).hashCode());
>>         System.out.println(new
>> Term("manu_id",NumericUtils.intToPrefixCoded(402)).hashCode());
>> 
>>         a bug?
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>For additional commands, e-mail: java-user-help@lucene.apache.org
>

= = = = = = = = = = = = = = = = = = = =


Hashcodes are not guaranteed to be different. See Object#hashCode()
javadocs.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Sariny [mailto:sariny@gmail.com]
> Sent: Friday, December 10, 2010 3:34 PM
> To: java-user
> Subject: maybe I hit a bug of Term ?
> 
> 
> 		Hi, two different Term get the same hashCode,  lucene
> version 3.0.2
> 
> 		System.out.println(new
> Term("manu_id",NumericUtils.intToPrefixCoded(111)).hashCode());
>         System.out.println(new
> Term("manu_id",NumericUtils.intToPrefixCoded(402)).hashCode());
> 
>         a bug?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org



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


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


Mime
View raw message