: 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. : the interest in this really that low (judging from the poor search : result I got when searching for "lucene sorting negative numbers" and : similar)? I would have thought that the need for this functionallity was : quite fundamental, and that it was already part of Lucene core. In my experience people the majority of people either: 1) don't care about numbers in Lucene 2) care about small ranges of numbers where simple padding or NumberTools is good enough. 3) use Solr and don't care that the indexed value is non-printable, because Solr's IndexSchema and FieldType management ensures thatthe "real" numeric value is all they ever see. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]