You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by srinir <sr...@nextag.com> on 2012/06/05 09:08:36 UTC

random results at specific slots

Hi,

I would like to return results sorted by score (desc), but i would like to
insert random results into some predefined slots (lets say 10, 14 and 18).
The reason I want to do that is I boost click-through rate based features
significantly and i want to give a chance to documents which doesnt have
enough click through rate data. This would help the results stay fresh.  

I looked into solr code and it looks like i need a custom QueryComponent
where once the top results are ordered, i can insert some random results at
my predefined slots and then return. I am wondering whether there is any
other way I can achieve the same?

Thanks
Srini

--
View this message in context: http://lucene.472066.n3.nabble.com/random-results-at-specific-slots-tp3987719.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: random results at specific slots

Posted by srinir <sr...@nextag.com>.
Other option I could think of is to write a custom component which implements
handleResponses, where i can pick random documents from across shards and
insert it into the ResponseBuilder's resultIds ? I would place this
component at the end (or after QueryCOmponent). will that work ? is there a
better solution ?

--
View this message in context: http://lucene.472066.n3.nabble.com/random-results-at-specific-slots-tp3987719p3987725.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: random results at specific slots

Posted by Jack Krupansky <ja...@basetechnology.com>.
Take a look at "query elevation". It may do exactly want you want, but at a 
minimum, it would show you how this kind of thing can be done.

See:
http://wiki.apache.org/solr/QueryElevationComponent

-- Jack Krupansky

-----Original Message----- 
From: srinir
Sent: Tuesday, June 05, 2012 3:08 AM
To: solr-user@lucene.apache.org
Subject: random results at specific slots

Hi,

I would like to return results sorted by score (desc), but i would like to
insert random results into some predefined slots (lets say 10, 14 and 18).
The reason I want to do that is I boost click-through rate based features
significantly and i want to give a chance to documents which doesnt have
enough click through rate data. This would help the results stay fresh.

I looked into solr code and it looks like i need a custom QueryComponent
where once the top results are ordered, i can insert some random results at
my predefined slots and then return. I am wondering whether there is any
other way I can achieve the same?

Thanks
Srini

--
View this message in context: 
http://lucene.472066.n3.nabble.com/random-results-at-specific-slots-tp3987719.html
Sent from the Solr - User mailing list archive at Nabble.com.