lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: Indexing floating point number
Date Mon, 30 Oct 2006 17:55:17 GMT
On 10/30/06, KEGan <> wrote:
> Newbie question. How do we index floating point number in Lucene, so that it
> is sortable ? There is a built-in utility class 'NumberTools' which help
> with indexing integer. Does Lucene has the same mechanism for floating point
> number?

You can look at NumberUtils in Solr, it has conversions for
int/long/float/double that make strings that sort correctly (for range
queries as well as sorts).  If you use Solr, these transformations are
automatically applied during indexing and querying depending on the
declared type of the field.

-Yonik Solr, the open-source Lucene search server

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

View raw message