This is part of the reason I keep poking the list for better number support
(and still haven't heard a "peep" as Phil would say about them, so I am
guessing that one or the other or both of 

A: It would take to much redesign to make lucene handle numbers better 
B: No one else has a need for indexing numbers and doing a search of all
docs with X field <300 and > 10)


I do what Phil used to do now, so I can tell you that we ended up trashing
this patch, and doing the dates in the following fashion:

We just made them a "normal" field, but put them in the format of 

YYYYMMDD

(make sure you pad with 0's if necessary - i.e.  19540203) for February
third, 1954.


This way, they sort alphabetically, so we could write our own date filter to
do a proper range query.


The built in date filter is really useless for historical information.


*****************************
Daniel C. Armbrust 
Medical Informatics Research 
Information Services 
Mayo Clinic Rochester 
Harwick 8-36 
(507) 538-1549 
[EMAIL PROTECTED]
*****************************


-----Original Message-----
From: Otis Gospodnetic [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 09, 2002 3:54 PM
To: Lucene Developers List
Cc: [EMAIL PROTECTED]
Subject: Re: Dates before 1970


Hello,

Ok, I found Philip's patch here:
http://nagoya.apache.org/eyebrowse/ReadMsg?[EMAIL PROTECTED]
he.org&msgId=116180

Am I missing something or is this patch specific to Philip's
application?  I'm referring to the DATE_OFFSET value of 200 years.
Is there any way of making it more generic?
For instance, I'm dealing with dates whose values I do not know ahead
of time.  Some dates that I see are 09-Jun-102 or 25-Oct-100.  These
are dates returned by various broken web servers out there.  These
particular dates should obviously be 09-Jun-2002 and 25-Oct-2000.

What can we do in DateField to allow indexing of dates before 1970?
Does anyone have any suggestions?

Otis

--- Otis Gospodnetic <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> It looks like DateField.timeToString method won't allow negative
> dates
> (i.e. dates before 1.1.1970).
> If one tries to index a pre-1970 date the following happens:
> 
> java.lang.RuntimeException: time too early
>       at org.apache.lucene.document.DateField.timeToString(Unknown Source)
>       at org.apache.lucene.document.DateField.dateToString(Unknown Source)
> 
> I am not the first one to encounter this error.  Philip Ogren hit
> this
> problem a long time ago:
>
http://nagoya.apache.org/eyebrowse/ReadMsg?[EMAIL PROTECTED]
e.org&msgId=114911
> 
> Does anyone have a workaround?
> In the above message Philip Ogren mentions only a documentation
> change,
> but I think he also submitted a patch, which I now cannot locate.
> 
> Does anyone have this patch?
> 
> Thanks,
> Otis
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to