year range field, proper data type?

2010-07-07 Thread Jonathan Rochkind
So I will have a solr field that contains years, ie, 1990, 2010, maybe even 1492, 1209 and 907/0907. I will be doing range limits over this field. Ie, [1950 TO 1975] or what have you. The data represents publication dates of books on a large library shelves; there will be around 3 million

Re: year range field, proper data type?

2010-07-07 Thread Erick Erickson
This isn't a very worrisome case. Most of the messages you see on the board about the dangers of dates arise because dates can be stored with many unique values if they include milliseconds. Then, when sorting on date your memory explodes because all the dates are loaded into memory. In your

Re: year range field, proper data type?

2010-07-07 Thread Lance Norskog
There is no 'trie string'. If you use a trie type for this problem, sorting will take much less memory. Sorting strings uses memory both per document and per unique term. The Trie types do not use any memory per unique term. So, yes, a Trie Integer is a good choice for this problem. On Wed, Jul