Right you are... sorry for that message. The good news is that the Field.Keyword(String, Date) issue was under two issues, so I marked one as a duplicate. And I see the workaround to the timeToString issue - duh.

Thanks,
Erik


Otis Gospodnetic wrote:
Erik,

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

Otis

--- Erik Hatcher <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.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