Try to cast MySQL decimal data type to string, i.e. CAST( IF(drt.discount IS NULL,'0',(drt.discount/100)) AS CHAR) as discount (or CAST AS TEXT)
On Mon, Dec 19, 2011 at 1:24 PM, Niels Stevens <ni...@kabisa.nl> wrote: > Hey everybody, > > I'm having an issue importing Decimal numbers from my Mysql DB to Solr. > Is there anybody with some advise, I will start and try to explain my > problem. > > According to my findings, I think the lack of a explicit mapping of a > Decimal value in the schema.xml > is causing some issues I'm experiencing. > > The decimal numbers I'm trying to import look like this : > > 0.075000 > 7.500000 > 2.250000 > > > but after the import statement the results for the equivalent Solr field > are returned as this: > > [B@1413d20 > [B@11c86ff > [B@1e2fd0d > > > The import statement for this particular field looks like: > > .... IF(drt.discount IS NULL,'0',(drt.discount/100)) ... > > > Now I thought that using the Round functions from mysql to 3 numbers after > the dot. > In conjunction with a explicite mapping field in the schema.xml could solve > this issue. > Is there someone with some similar problems with decimal fields or anybody > with an expert view on this? > > Thanks a lot in advance. > > Regards, > > Niels Stevens