Hi Srilatha, One way to do this would be by making two calls, one to your sponsored list where you pick two at random and a solr call where you pick all the search results and then stick them together in your client.
Sujit On Oct 4, 2012, at 12:39 AM, srilatha wrote: > For an E-commerce website, we have stored the products as SOLR documents with > the following fields and weights: > Title:5 > Description:4 > > For some products, we need to ensure that they appear in the top ten results > even if their relevance in the above two fields does not qualify them for > being in top 10. For example: > P1, P2, .... P10 are the legitimate products for a given search keyword > "iPhone". I have S1 ... S100 as sponsored products that want to appear in > the top 10. My policy is that only 2 of these 100 sponsored products will be > randomly chosen and shown in the top 10 so that the results will be: S5, > S31, P1, P2, ... P8. In the next request, the sponsored products that gets > slipped in may be S4, S99. > > The QueryElevationComponent lets us specify the docIDs for keywords but does > not let us randomize the results such that only 2 of the complete set of > sponsored docIDs is sent in the results. > > Any suggestions for implementing this would be appreciated. > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/How-to-make-SOLR-manipulate-the-results-tp4011739.html > Sent from the Solr - User mailing list archive at Nabble.com.