Is this question still pending? Well I haven't tried it but DateFilter might be what you're looking for:
http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/search/DateF ilter.html You could also add a field that's a kind of enumerated indicating how recent the doc is. You add a field "when" with a value of "day", "week", "month", "year", to indicate if it is a day old, week old etc. Then you query using a boost: when:day^2.0 when:week^1.8 when:month^1.6 when:year:^1.4 and priority will be given to newer docs. -----Original Message----- From: Kent Vilhelmsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 12:00 PM To: [EMAIL PROTECTED] Subject: Search result ordering question I've been using Lucene a bit, and find it very flexible and fast. However, I need to order search results by date (or, equally, document id); I've looked a bit into (re)writing a collect method without any luck. I'm not programming Java too much, so I'm not getting any way with the (few) hints I've seen regarding date-sorted result sets. Does anyone have a quick solution/example to give? thanks, Kent Vilhelmsen -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
