lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: DateField bug?
Date Tue, 17 Dec 2002 01:51:19 GMT
Erik,

I think both of those issues may already be in Bugzilla.... don't know
bug IDs.

Otis

--- Erik Hatcher <lists@ehatchersolutions.com> wrote:
> Before I enter this into Bugzilla, I thought I'd get a sanity check 
> here.  I'm using DateField and indexing it like this:
> 
>    doc.add(Field.Keyword("modified",
>            DateField.timeToString(file.lastModified())));
> 
> (I'm not using the Date variant of the Keyword method).
> 
> It indexes fine, but on retrieval, I'm doing this:
> 
>    long time = DateField.stringToTime(indexModified);
> 
> And this is dying with this:
> 
> java.lang.NumberFormatException:  d968b5t4
>          at java.lang.Long.parseLong(Long.java:310)
>          at org.apache.lucene.document.DateField.stringToTime(Unknown
> 
> Source)
> 
> This is occuring in 1.3-dev1 build, but not in the 1.2 build.
> 
> I checked a few sources in Lucene's CVS, but didn't spot anything
> with 
> relevant changes.  But something is fishy somewhere.  Can anyone spot
> 
> anything I'm doing wrong or offer any clues?
> 
> Also, the Field.Keyword(String, Date) method is setting the field to
> be 
> tokenized - is this appropriate?  The Field.Keyword(String, String)
> does 
> not set that flag.
> 
> Thanks,
> 	Erik
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-dev-help@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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


Mime
View raw message