lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Spencer, Dave" <>
Subject RE: Search result ordering question
Date Wed, 13 Mar 2002 00:42:42 GMT
Is this question still pending?
Well I haven't tried it but DateFilter might be what you're looking for:

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 []
Sent: Tuesday, March 12, 2002 12:00 PM
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?

Kent Vilhelmsen

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

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

View raw message