lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David_Birtw...@VWR.COM
Subject Similarity byteToFloat() and and floatToByte()
Date Fri, 27 Jun 2003 17:36:20 GMT
Hi, all,

We have a search application that applies a document boost based on an
integer rank value.  What we need to do is tranform this int value into a
float lucene boost.  Because of the byte encoding of boost values in
lucene, only discreet float boost values are used.  We need to make sure
that our integer ranks correspond to different float boost values.  To do
this, I had made Similarity.byteToFloat() public and used this method to
transform a byte value to a boost, then calling Document.setBoost() with
this float value.

I would like to remove our mod to Lucene by taking advantage of the scorer
API and writing our own Similarity class that has a method to transform an
int rank to a float boost.  Unfortunately, byteToFloat() is private, so my
Similarity class cannot make use of it.

Given the byte encoding, I can't see another way to achieve the
functionality we desire without using byteToFloat().  Would it be OK to
make byteToFloat() protected, instead of private?  Is there a better way to
expose this functionality?

Thanks,
DaveB







****************************************************************************************************************

The information contained in this e-mail message may be privileged,
confidential and protected from disclosure.
If you are not the intended recipient, any dissemination, distribution or
copying is strictly prohibited. If you think
that you have received this e-mail message in error please e-mail the
sender and delete the message. Thank you
*****************************************************************************************************************





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


Mime
View raw message