I have some BigDecimal values which should be indexed for searching. Lucene has NumericField but it has setters only for long, double, float and int. I could store it as a String but then I would not benefit from NumericRangeQuery.
How you have stored your BigDecimals? Any best practices to share?
Steven Rowe provides interesting ideas in this post:
http://www.lucidimagination.com/search/document/ad648772f8825a28/bigdecimal_values#2502f96055839c3d
He says that his scheme could probably be used to represent all BigDecimal values. It seems easier to implement if you don't need negative values. Like mindas suggested, you could extend AbstractField to implement this.
There is also Yonik Seeley who says he has started some work in Solr for that with the class BCDUtils:
http://www.lucidimagination.com/search/document/ad648772f8825a28/bigdecimal_values#cef1d0e25af063ef