lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jimi HullegÄrd <jimi.hulleg...@mogul.com>
Subject RE: Number to printable sortable string, including floating point numbers and negatives
Date Fri, 12 Sep 2008 06:33:50 GMT
> : Do you have any suggestions on how to solve this in a
> "neat" way? And is
>
> Have you looked at the NumberTools class?
>
> As i recall it generates strings that are always printable, but as a
> result (of using fewer characters) are also always longer then the
> corrisponding value from Solr's NumberUtils.
>
> NumberTools only has methods for longs at the moment, but the same
> doubleToRawLongBits logic from NumberUtils could be usedto apply it to
> doubles as well.

Ah, no I have never looked at the NumberTools class, simply because I had no idea it existed.
Thanks for the tip! It looks just about right for me.

/Jimi

---------------------------------------------------------------------
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