Random noise in Solr score

Posted by Andrea Campi on Stack Overflow See other posts from Stack Overflow or by Andrea Campi
Published on 2011-02-03T21:44:56Z Indexed on 2011/02/04 7:25 UTC
Read the original article Hit count: 326

Filed under:
|
|
|

I am looking for a way of introducing random noise into my scoring function, and I'm at a loss on how to best proceed.

Some background:

We use Solr for a web application that manages large-ish sets of photos for agencies.

One customer has an interesting requirement for scoring:

  • 'quality' field, maintained by editors, from 1 (highest) to 3 (lowest);
  • 'date' field, boosting more recent photos; I would probably use a logarithmic function;

However, due to how the stock photo market works, this will likely result in many similar photos appearing together. Their request is to give 'quality' a large boost, but introduce some randomness so that photos will not appear in a strict date order.

Any idea?

EDITED: a key requirement is to have "stable" query results: if I search twice for "tropical island" I can get a slightly different result set, but if I ask for the first page, then the second, then the first, I'd better get the same results :)

© Stack Overflow or respective owner

Related posts about random

Related posts about solr