Re: float or string type for a field with whole number and decimal number values?

2016-05-31 Thread Derek Poh
Sorry about that. Thank you for your explanation. I still have some questions on using and setting up collection alias for my current situation. I will start a new threadon this. On 5/31/2016 11:21 PM, Erick Erickson wrote: First, when changing the topic of the thread, please start a new

Re: float or string type for a field with whole number and decimal number values?

2016-05-31 Thread Erick Erickson
First, when changing the topic of the thread, please start a new thread. This is called "thread hijacking" and makes it difficult to find threads later. Collection aliasing does not do _anything_ about adding/deleting/whatever. It's just a way to do exactly what you want. Your clients point to

Re: float or string type for a field with whole number and decimal number values?

2016-05-31 Thread Derek Poh
Hi Erick Thank you for pointing out the sort behaviour of numbers in a string field. I did not think of that. Will use float. Would like to know how would you guys handle the usage of collection alias in my case. I have a 'product' collectionand Icreate a new collection'product_tmp' for

Re: float or string type for a field with whole number and decimal number values?

2016-05-30 Thread Erick Erickson
bq: Should I change the field type to "float" or "string"? I'd go with float. Let's assume you want to sort by this field. 10.00 sorts before 9.0 if you just use Strings. Plus floats are generally much more compact. bq: do I need to delete all documents in the index and do a full

Re: float or string type for a field with whole number and decimal number values?

2016-05-29 Thread Derek Poh
I am using solr 4.10.4. On 5/29/2016 3:52 PM, Derek Poh wrote: Hi I have a field that is of "int" type currentlyand it's values are whole numbers. stored="true" multiValued="false"/> Due tochange inbusiness requirement, this field will need to take in decimal numbers as well. This

float or string type for a field with whole number and decimal number values?

2016-05-29 Thread Derek Poh
Hi I have a field that is of "int" type currentlyand it's values are whole numbers. stored="true" multiValued="false"/> Due tochange inbusiness requirement, this field will need to take in decimal numbers as well. This fieldis sorted onand filter by range (field:[ 1 to *]). Should I