On 7/14/06, Rob Staveley (Tom) <[EMAIL PROTECTED]> wrote:
I was wanting to apply this to a field, which sorts on INT.
The problem with int is that the FieldCache stores the values as an int[], and you can't tell when a value is missing.
Specifically I'm trying to achieve reverse chronological sorting on a timestamp field, which stores YYMMDDHHI (i.e. resolves to 10 minutes and doesn't handle centuries). Missing timestamps are assumed to be "old" (i.e. should appear at the end). I could get this to sort on String and use MissingStringLastComparatorSource, but would this not be less efficient than sorting in INT??
String sorting takes more memory, but the speed is the same. Local sorting with the FieldCache for strings is done via the ordinal value (no string compare is done, just int comparisons). -Yonik http://incubator.apache.org/solr Solr, the open-source Lucene search server --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]