lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wechner <>
Subject Re: sorting by date (XML)
Date Tue, 27 Apr 2004 12:55:48 GMT
Nader S. Henein wrote:

>Here's my two cents on this:
>Both ways you will need to combine the date in one field, but if you use a
>millisecond representation you will not be able to use the FLOAT sort type
>and you'll have use STRING sort (Slower) because the millisecond
>representation is longer than FLOAT allows, so you have three options:
>1) Use YYYYMMDD and sort by FLOAT type

ok, I guess then will take the FLOAT type

>2) Use the millisecond representation and sort by STRING type
>3) If the date you're entering here is the date of indexing then you can
>just sort by DOC type (which is the DOC ID) and save yourself the pain
unfortunately this isn't possible.

Thanks a lot for your help


>Hope this helps.
>Nader Henein
>-----Original Message-----
>From: Michael Wechner [] 
>Sent: Tuesday, April 27, 2004 3:52 PM
>To: Lucene Users List
>Subject: sorting by date (XML)
>my XML files contain something like
>  <year>2004</year><month>04</month><day>27</day>...
>and I would like to sort by this date.
>So I guess I need to modify the Documentparser and generate something like a
>millisecond field and then sort by this, correct?
>Has anyone done something like this yet?

Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya                  

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message