On Fri, Feb 4, 2011 at 12:56 PM, Dennis Gearon <gear...@sbcglobal.net> wrote: > Using solr 1.4. > > I have a price in my schema. Currently it's a tfloat. Somewhere along the way > from php, json, solr, and back, extra zeroes are getting truncated along with > the decimal point for even dollar amounts. > > So I have two questions, neither of which seemed to be findable with google. > > A/ Any way to keep both zeroes going inito a float field? (In the analyzer, > with > XML output, the values are shown with 1 zero) > B/ Can strings be used in range queries like a float and work well for prices?
You could do a copyField into a stored string field and use the tfloat (or tint and store cents) for range queries, searching, etc, and the string field just for display. -Yonik http://lucidimagination.com > >  Dennis Gearon > > > Signature Warning > ---------------- > It is always a good idea to learn from your own mistakes. It is usually a > better > idea to learn from others’ mistakes, so you do not have to make them yourself. > from 'http://blogs.techrepublic.com.com/security/?p=4501&tag=nl.e036' > > > EARTH has a Right To Life, > otherwise we all die. > >