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 details).

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.

--Peter


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:   <mailto:lucene-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@;jakarta.apache.org>

Reply via email to