Re: How to preserve 0 after decimal point?
Thanks for your response. -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-preserve-0-after-decimal-point-tp4159295p4231961.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to preserve 0 after decimal point?
: second, and assuming your problem is really that you're looking at the : _display_, you should get back exactly what you put in so I'm guessing Not quite ... With the numeric types, the numeric value is both indexed and stored so that there is no search/sort inconsistency between 1.1, 1.10, 001.1 etc... those are all the number 1.1 and are treated as such. if you have an input string of that you want preserved verbatim, then you need to use a string type. It doesn't matter if those strings *look* like numbers or not, if you consider 27.50 to be different from 27.5 then those aren't numbers, they are strings. -Hoss http://www.lucidworks.com/
Re: How to preserve 0 after decimal point?
Really! Ya learn something new every day. On Wed, Sep 17, 2014 at 10:48 AM, Chris Hostetter hossman_luc...@fucit.org wrote: : second, and assuming your problem is really that you're looking at the : _display_, you should get back exactly what you put in so I'm guessing Not quite ... With the numeric types, the numeric value is both indexed and stored so that there is no search/sort inconsistency between 1.1, 1.10, 001.1 etc... those are all the number 1.1 and are treated as such. if you have an input string of that you want preserved verbatim, then you need to use a string type. It doesn't matter if those strings *look* like numbers or not, if you consider 27.50 to be different from 27.5 then those aren't numbers, they are strings. -Hoss http://www.lucidworks.com/
How to preserve 0 after decimal point?
I have a requirement to preserve 0 after decimal point, currently with the below field type fieldType class=solr.SortableFloatField name=sfloat omitNorms=true sortMissingLast=true/ 27.50 is stripped as 27.5 27.00 is stripped as 27.0 27.90 is stripped as 29.9 float name=Price27.5/float I also tried using double but even then the 0's are getting stripped. double name=Price27.5/double Input data: field name=Price27.50/field -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-preserve-0-after-decimal-point-tp4159295.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to preserve 0 after decimal point?
Whoa! First, you should really NOT be using sfloat (or pfloat) or any of their variants unless you're waaay back on 1.4. Those were fine in their time, but numeric types (float/tfloat and the rest) are vastly preferred. Also more efficient in terms of CPU cycles and storage. second, and assuming your problem is really that you're looking at the _display_, you should get back exactly what you put in so I'm guessing pilot error here. But you need to provide more details, especially the Solr version and how the output is displayed. Best, Erick On Tue, Sep 16, 2014 at 5:15 PM, bbarani bbar...@gmail.com wrote: I have a requirement to preserve 0 after decimal point, currently with the below field type fieldType class=solr.SortableFloatField name=sfloat omitNorms=true sortMissingLast=true/ 27.50 is stripped as 27.5 27.00 is stripped as 27.0 27.90 is stripped as 29.9 float name=Price27.5/float I also tried using double but even then the 0's are getting stripped. double name=Price27.5/double Input data: field name=Price27.50/field -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-preserve-0-after-decimal-point-tp4159295.html Sent from the Solr - User mailing list archive at Nabble.com.