Hi Nic,

CustomScoreQuery or FieldScoreQuery is introduced with Lucene 2.2. 
If you don't want to wait for Lucene.Net 2.2, writing a custom sort function
and sorting the returned results -for ex.,using the "timestamp" field and
the Score() method of Hits class- may be a quick solution.

DIGY

-----Original Message-----
From: Nic Wise [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 15, 2008 7:46 PM
To: [email protected]
Subject: Bubbling up "newer" records

Hi there

 

Long time user (and reader), first time poster J

 

Just wondering if anyone knows of a way to bubble up (ie, increase the
score on) items which are newer - either via putting a date field in the
document, or some kind of timestamp / tick count.

 

I have found some references to doing it in the Java version, but I
can't find many of the the classes (FieldScoreQuery, CustomScoreQuery)
in the .NET version - I assume they are new in the Java version. I
looked into replacing the Query, Weight, Scorer set, modelling it off
the Lucene.Net.Search.Spans stuff.... But nothing so far.

 

Am I even looking in the right place? Is it even possible?

 

I'm after something with a long, flat tail (so I guess I'm going to have
to write something custom regardless) - eg stuff which is 1 day old gets
a boost of 10, 1 week old is 5, 1 month is 2, over three months is 0 etc
(with a floating scale on those - think "the long tail" diagram
(http://en.wikipedia.org/wiki/The_Long_Tail), but have it hit 0 when it
flattens out.)

 

Anyone done this? 

 

Thanks heaps.

 

Nic Wise

Lead .NET Developer, TopGear.com redevelopment.

BBC Worldwide. 
This e-mail (and any attachments) is confidential and may contain personal
views which are not the views of the BBC unless specifically stated. If you
have received it in error, please delete it from your system. Do not use,
copy or disclose the information in any way nor act in reliance on it and
notify the sender immediately.
 
Please note that the BBC monitors e-mails sent or received. Further
communication will signify your consent to this

This e-mail has been sent by one of the following wholly-owned subsidiaries
of the BBC:
 
BBC Worldwide, Registration Number: 1420028 England, Registered Address:
Woodlands, 80 Wood Lane, London W12 0TT
BBC World, Registration Number: 04514407 England, Registered Address:
Woodlands, 80 Wood Lane, London W12 0TT
BBC World Distribution Limited, Registration Number: 04514408, Registered
Address: Woodlands, 80 Wood Lane, London W12 0TT

Reply via email to