lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <daniel.na...@t-online.de>
Subject Re: the future of DateField
Date Tue, 17 Aug 2004 18:50:55 GMT
On Tuesday 17 August 2004 19:34, Damian Gajda wrote:

> That is why I had to move from dates represented
> the way Daniel suggests - to decimal integer numbers. This creates very
> ugly looking "date" strings but needs only 4bytes per term while
> sorting. That IS a memory advantage.

What about using different fields for the date, like "2004-08-17" is 
indexed as y:2004, m:08, d:17? however, you'd need to build some 
"interesting" queries for range searches, for example:

documents from 2003-10 to 2004-05
query: (+y:2003 +m:[10 TO 12]) (+y:2004 +m:[01 TO 05])

But the number of terms is dramatically reduced.

Anyway, I see DateField as a convenience class that's good enough for most, 
but not all,  uses. If we start making it too efficient we introduce those 
limitation like "no dates before 1970" etc.

Regards
 Daniel

-- 
http://www.danielnaber.de

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


Mime
View raw message