[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lucene-user
Subject:    Re: sorted search
From:       Daniel Naber <daniel.naber () t-online ! de>
Date:       2005-02-24 18:07:36
Message-ID: 200502241907.36239.daniel.naber () t-online ! de
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic