On 16 Nov 2005, at 04:42, [EMAIL PROTECTED] wrote:
Providing that I have indexed documents with the following fields:

 Keyword:   lastmodifiedDate
 Unstored:  contents

And that I run a simple query only using just the contents field.

Is there anyway to change the way Lucene presents results, so documents with a high score and lastmodifiedDate closer to today are presented first? Note that I do not want to reverse sort by lastmodifiedDate, what I want is
to take the date into account in the scoring.

If you have a copy of "Lucene in Action", check out the TheServerSide case study that Dion Almaer contributed. TSS boosts more recent content.

If you're re-indexing (for example nightly, like TSS does) you can dynamically adjust boosts on the document based on last modified date.

If you need to boost without reindexing, I'm not quite sure what the best solution is - perhaps a custom Query subclass that can do this based on the current date?

    Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to