lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ac <>
Subject CustomScoreQuery numerical precision problem
Date Tue, 19 May 2009 00:32:58 GMT
I am using CustomScoreQuery for result ranking.
A field of my documents is parsable as an integer value, the magnide
of which exceeds the precision of the float type.
A sample value of this field is 24118569

However, due to the nature of CustomScoreQuery, a cast from int to
float is performed during the scoring( in the class
IntFieldSource), this cause the number from the example to become
24118568 (off by 1) (on a Pentium D 3.2GHz, 32bit OpenSuse 10.3, JDK
This is problematic, because this value is then used as the key to
perform a database query.

I think I can get that cache from IntFieldSource or make my own, then
just lookup that array during customScore().

Any other suggestions ?


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

View raw message