Lucene only uses strings to store and search, you should convert any
objects to string.
For dates you have a special Date field that you should use which
converts dated to a searchable strings

Aviran
http://www.aviransplace.com 

-----Original Message-----
From: haipeng du [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 20, 2005 10:40 AM
To: lucene-dev@jakarta.apache.org; lucene-user@jakarta.apache.org
Subject: date keyword

I use lucene to index a key word with date object. When I search
document, how could I process the searching result for that field? For
example:
index date with
Field field = Field.Keyword("created", new Date); .....
......
When I search that, I get that field back Field f =
doc.getField("created").
but value of that field is just like
0edtel52h
How could I process that to get Date object back?
Thanks a lot. 

--
Haipeng Du
Software Engineer
Comphealth,
Salt Lake City


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

Reply via email to