lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Lea" <>
Subject Re: BigDecimal values
Date Thu, 20 Nov 2008 14:19:23 GMT

Lucene only indexes strings.  The standard advice for numeric is to
pad to desired width with leading zeros, if likely to be used in range
searches.  How varied are the numbers you're going to be working with?
 I only work with stuff with 2 decimal places and tend to lose that.

2.22 would be indexed as 000222
0.99  ... 000099

And of course go through the same conversion when searching.

But if you've got variable numbers of decimal places it might get more


On Thu, Nov 20, 2008 at 2:10 PM, Sergey Kabashnyuk <> wrote:
> Hello
> I want to ask community an advice:
> what is the best way to index and search java.math.BigDecimal values in
> lucene 2.4.
> Any code snippets  are welcome.
> Sergey Kabashnyuk
> eXo Platform SAS

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

View raw message