lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: MissingStringLastComparatorSource and MultiSearcher
Date Fri, 14 Jul 2006 20:59:18 GMT
On 7/14/06, Rob Staveley (Tom) <> 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 Solr, the open-source Lucene search server

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message