lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Carlson <>
Subject Re: Date can't be before 1970?
Date Mon, 04 Nov 2002 06:06:08 GMT
The other option that some people have used is to not use the DateField 
and just create your own format following the
yyyyMMdd format

So 20020101 for Jan 1, 2002

Note that you cannot use the Date Filter to filter dates.

However you can use the built in range query (see query syntax for more 

So to search for all dates in 2002 in the pubDate field you can use

pubDate:[20020101 - 20021231]

Note the space on either side of the dash (-).

Since this is just a string, it is not affected by the 1970 issues. I 
hope this helps.


On Sunday, November 3, 2002, at 10:01 PM, Herman Chen wrote:

> Hi,
> I noticed that DateField.dateToString does not allow dates before 
> 1970.  Is the limitation caused by java's Date or by the way it needs 
> to be encoded for the index.  What is the suggested solution to deal 
> with dates prior to 1970?  Thanks.
> --
> Herman

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

View raw message