lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Koberg <>
Subject Re: sorting by date (XML)
Date Tue, 27 Apr 2004 19:41:51 GMT
Erik Hatcher wrote:

> On Apr 27, 2004, at 2:09 PM, Robert Koberg wrote:
>> Otis Gospodnetic wrote:
>>> Because having small time units like milliseconds will result in Range
>>> query expanding to a large number of BooleanQueries, if you have a lot
>>> of documents with unique time stamps.  Rounding the timestamp to
>>> minutes, hours, or days, can drastically reduce the number of unique
>>> time stamps, hence resulting in less BooleanQueries.
>> Cool, thanks. So DateField.dateToString is the best, most efficient 
>> way, correct?
> It all depends.  But if all you care about is year, month, day, it is 
> _not_ the most efficient.  DateField converts down to milliseconds, and 
> is what Otis was referring to.

Oops, I meant to write DateField.timeToString which I use when querying. 
If I use DateField.dateToString when indexing but timeToString when 
searching is that a bad practice? I do only need month, day and year. So 
should I be indexing with timeToString?

How would you do it if the above is still a bad practice?

Sorry for the basic questions...


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

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

View raw message