lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mordo, Aviran (EXP N-NANNATEK)" <aviran.mo...@lmco.com>
Subject RE: Sorting results by both score and date
Date Fri, 16 Sep 2005 13:52:28 GMT
You can write a query and add a date range to it giving the date field a
boost.

For instance you can do "+content:foo date:[{Today's date} TO null]^5
date:[{Yesterday's Date} TO {Today's Date}]^4 date:[{Last Week's Date}
TO Yesterday's Date}]^3 and so on

Aviran
http://www.aviransplace.com

-----Original Message-----
From: Tim.Wright@informa.com [mailto:Tim.Wright@informa.com] 
Sent: Friday, September 16, 2005 9:43 AM
To: java-user@lucene.apache.org
Subject: Sorting results by both score and date

Hi,

I'm working in an industry which is fairly time sensitive, and older
documents are inherently less valuable. I'd like to be able to "weight"
the score of search results, so that older documents score lower. I
don't just want to sort by date, though - I'd still like results to be
ordered by score, just an "adjusted" score. 

I've read the excellent LIA, including the chapter on custom sort
methods, but from what I can tell that still only implements a sort on
one field - I really want to be able to sort on a "blend" of fields (one
of this is the actual document score). 

Could anyone suggest how I could implement this? I considered explicitly
weighting the documents with a function of their date at index time, but
this would mean the "weight" of the new documents would have to increase
exponentially over time, and I suspect things would get messy! (Our
dataset is around 250k documents, growing by a few thousand a month.)

Cheers,

Tim.



************************************************************************
********
The information contained in this email message may be confidential. If
you are not the intended recipient, any use, interference with,
disclosure or copying of this material is unauthorised and prohibited.
Although this message and any attachments are believed to be free of
viruses, no responsibility is accepted by T&F Informa for any loss or
damage arising in any way from receipt or use thereof.  Messages to and
from the company are monitored for operational reasons and in accordance
with lawful business practices. 
If you have received this message in error, please notify us by return
and delete the message and any attachments.  Further enquiries/returns
can be sent to postmaster@tfinforma.com


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message