I understand that. But from Field API, there is a method of Keyword which accepts Date object as value. When I use that method to index, I can not get real date back. I also use other method to pass a string value to index. That works great. Does that mean I can not use that method to index keyword? Thanks a lot. Haipeng
On 9/20/05, Mordo, Aviran (EXP N-NANNATEK) <[EMAIL PROTECTED]> wrote: > > 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 > > -- Haipeng Du Software Engineer Comphealth, Salt Lake City