lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <daniel.na...@t-online.de>
Subject Re: sorted search
Date Thu, 24 Feb 2005 18:07:36 GMT
On Thursday 24 February 2005 19:01, Yura Smolsky wrote:

>       sort.setSort( new SortField[] { new SortField ("modified",
> SortField.STRING, true) } );

You should store the date as a number, e.g. "days since 1970" (or weeks if 
that is precise enough) and then tell the sort that it's an integer. 
DateField always stores the date in milliseconds which leads to a large 
number of terms, it also turns the date into a string, both makes searching 
and especially sorting slower.

Regards
 Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message