lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terry Steichen" <te...@net-frame.com>
Subject Re: Order by date
Date Mon, 02 Sep 2002 19:16:14 GMT
Try Peter Carlson's SearchBean contribution.  Check the messages - there was
quite a bit of discussion on it.

Regards,

Terry

----- Original Message -----
From: "Philipp Chudinov" <morpheus@basko.ru>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Monday, September 02, 2002 3:21 PM
Subject: Order by date


> Hi!
> How can I order search results by date? I just need to show n documents,
> ordered by date (desc). I index documents with
>
> doc.add(Field.Keyword("_published", new
> SimpleDateFormat("yyyyMMddHHmmss").format(date)));
>
> , so it gives something like "20020619165800" in this field. Then I use
> RangeQuery(null, currentdate(formatted the same way
> indexed("yyyyMMddHHmmss"), true). But results are not ordered properly.
> Looks like this:
>
> 20020619165800
> 20020619165800
> 20020619165800
> 20020711170700
> 20020711170700
> 20020705131800
> 20020705131800
> 20020619165900
>
> So, how can I order them? Should I write some kind of "DateFilter" (as
> suggested here
> http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg01266.html)?
> If so, can't anybody explane me, how can I do this, since I feel myself as
a
> lobotomized flatworm now:(
>
> Thanx.
>
>
> --
> To unsubscribe, e-mail:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message