Oh, and sorry to miss the sorting question. Lucene can sort search results by String or numeric values. Field.Keyword(String,Date) can only be sorted as a String though. If you truly want to index and sort dates but don't need hours, minutes, seconds, milliseconds, then index them as YYYYMMDD and you can then sort them as numerics, which is much more resource friendly.

    Erik


On 17 Nov 2005, at 07:00, Erik Hatcher wrote:


On 17 Nov 2005, at 05:43, [EMAIL PROTECTED] wrote:

I indexed dates using Field.Keyword(String,Date). The values seem to be encoded when I retrieve them via document.get("date"). Luke confirmed it. How do I decode the Date when retrieving from Document object? Or does it not work in version 1.4.3? Also, does Lucene only sort String values?


What ya need is a brand new copy of Lucene in Action :)

    <http://www.lucenebook.com/search?query=date+convert>

Look at the DateField utilities.

    Erik




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Daniel Clark, Senior Consultant
Sybase Federal Professional Services
6550 Rock Spring Drive, Suite 800
Bethesda, MD  20817
Office - (301) 896-1103
Office Fax - (301) 896-1604
Mobile - (703) 403-0340
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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




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



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

Reply via email to