Thanks Pavlo!

And yes, I use incremental indexing =)
I have a create date, but can I boost the (inverted) "distance" between DateTime.Now and CreateDate?

That is, boost the  most with dates that  have the lowest distance.

Thanks,
Rob


Pavlo Zahozhenko wrote:
You can analyze creation date of each indexed item and boost the resulting
Lucene documents accordingly. For example, I'm using the following formula:
" dateBoost = 1 + (DateBoostCoeff - 1)/(distance.TotalDays + 1) ", where
distance.TotalDays is the difference in days between DateTime.Today and item
creation date. Then simply " doc.SetBoost(dateBoost) ". This formula fits my
needs, but you'll probably have to experiment with different formulas a bit
to find out what fits your model.

Now all this gets much more complex if you're using incremental indexing,
but there's a solution for it as well.

Regards,
          Pavlo Zahozhenko

On Tue, Dec 22, 2009 at 1:18 PM, Robert Pohl <[email protected]> wrote:

Hi all,

Is there a way to boost index position?
I want to achieve a result that is basically sorted by the latest (added to
the index) on top, as well as text relevance.
For example I search for tiger woods, and don't want articles from last
year (in the first places).

Thanks,
Rob




Reply via email to