Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 571 invoked from network); 11 Sep 2008 23:28:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2008 23:28:00 -0000 Received: (qmail 41764 invoked by uid 500); 11 Sep 2008 23:27:53 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 40977 invoked by uid 500); 11 Sep 2008 23:27:51 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 40966 invoked by uid 99); 11 Sep 2008 23:27:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 16:27:51 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.69.42.181] (HELO radix.cryptio.net) (208.69.42.181) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 23:26:53 +0000 Received: by radix.cryptio.net (Postfix, from userid 1007) id AA96E71C4B0; Thu, 11 Sep 2008 16:27:24 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by radix.cryptio.net (Postfix) with ESMTP id A6DCF71C4AE for ; Thu, 11 Sep 2008 16:27:24 -0700 (PDT) Date: Thu, 11 Sep 2008 16:27:24 -0700 (PDT) From: Chris Hostetter To: "java-user@lucene.apache.org" Subject: Re: Number to printable sortable string, including floating point numbers and negatives In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org : 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: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org